remove use of underscore shim in coffeescripts/helpers/assertions.js
refs CFA-33 flag=none Change-Id: I4b073c71f41a07b718a1a22ea23fdc3032f7bf37 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/337042 Reviewed-by: Charley Kline <ckline@instructure.com> Reviewed-by: Samuel Lee <samuel.lee@instructure.com> QA-Review: Aaron Shafovaloff <ashafovaloff@instructure.com> Product-Review: Aaron Shafovaloff <ashafovaloff@instructure.com> Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
parent
d6c61ed2ee
commit
940e45f2bc
|
@ -16,10 +16,10 @@
|
|||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const _ = require('underscore')
|
||||
const axe = require('axe-core')
|
||||
import {reject} from 'lodash'
|
||||
import axe from 'axe-core'
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
isVisible($el, message = '') {
|
||||
ok($el.length, 'elements found')
|
||||
ok($el.is(':visible'), `${$el} is visible ${message}`)
|
||||
|
@ -56,10 +56,7 @@ module.exports = {
|
|||
|
||||
return axe.a11yCheck(el, axeConfig, result => {
|
||||
const ignores = options.ignores || []
|
||||
const violations = _.reject(
|
||||
result.violations,
|
||||
violation => ignores.indexOf(violation.id) >= 0
|
||||
)
|
||||
const violations = reject(result.violations, violation => ignores.indexOf(violation.id) >= 0)
|
||||
|
||||
const err = violations.map(violation =>
|
||||
[`[${violation.id}] ${violation.help}`, `${violation.helpUrl}\n`].join('\n')
|
||||
|
|
Loading…
Reference in New Issue