Skip to content

Commit

Permalink
Use js- class prefixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fofr committed Sep 15, 2017
1 parent 78899b2 commit 61dec17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -33,9 +33,9 @@
var errorText = _processViolations(results.violations, results.url)
var incompleteWarningsObj = _processIncompleteWarnings(results.incomplete)

var bodyClass = results.violations.length === 0 ? "test-a11y-success" : "test-a11y-failed"
var bodyClass = results.violations.length === 0 ? "js-test-a11y-success" : "js-test-a11y-failed"
document.body.classList.add(bodyClass);
document.body.classList.add("test-a11y-finished");
document.body.classList.add("js-test-a11y-finished");

callback(undefined, errorText, incompleteWarningsObj)
})
Expand Down
Expand Up @@ -90,7 +90,7 @@ describe('AccessibilityTest', function () {
addToDom('<div>text</div>')

AccessibilityTest(TEST_SELECTOR, function (err, violations, incompleteWarnings) {
expect(document.body.classList.contains('test-a11y-finished')).toBe(true)
expect(document.body.classList.contains('js-test-a11y-finished')).toBe(true)
done()
})
})
Expand All @@ -99,7 +99,7 @@ describe('AccessibilityTest', function () {
addToDom('<div>text</div>')

AccessibilityTest(TEST_SELECTOR, function (err, violations, incompleteWarnings) {
expect(document.body.classList.contains('test-a11y-success')).toBe(true)
expect(document.body.classList.contains('js-test-a11y-success')).toBe(true)
done()
})
})
Expand Down Expand Up @@ -136,8 +136,8 @@ describe('AccessibilityTest', function () {
})

expect(violations).toBe(errorMessage)
expect(document.body.classList.contains('test-a11y-finished')).toBe(true)
expect(document.body.classList.contains('test-a11y-failed')).toBe(true)
expect(document.body.classList.contains('js-test-a11y-finished')).toBe(true)
expect(document.body.classList.contains('js-test-a11y-failed')).toBe(true)
done()
})
})
Expand Down

0 comments on commit 61dec17

Please sign in to comment.