- Optimization: Re-rerun image optimization per update

- Linting (ESLint): Adjust per now applied rules
- Testing: Accessibility test API update
- Docs: Clarify need for Node.js/npm being installed
- npm: Update devDeps and core-js-bundle copy; add new axe testing peer dep. axe-core
This commit is contained in:
Brett Zamir
2019-06-27 12:21:55 +08:00
parent c39d86cb58
commit efcde397ac
22 changed files with 375 additions and 254 deletions

View File

@@ -1,7 +1,7 @@
// https://github.com/DevExpress/testcafe
// https://devexpress.github.io/testcafe/documentation/test-api/
// https://github.com/helen-dikareva/axe-testcafe
import axeCheck from 'axe-testcafe';
import {axeCheck, createReport} from 'axe-testcafe';
/**
* @external AxeResult
@@ -13,8 +13,8 @@ import axeCheck from 'axe-testcafe';
* @param {external.TestcafeTest} t
* @returns {Promise<external:AxeResult>}
*/
function axeCheckWithConfig (t) {
return axeCheck(
async function axeCheckWithConfig (t) {
const /* error, */ {violations} = await axeCheck(
t,
// context: https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#context-parameter
undefined,
@@ -26,6 +26,7 @@ function axeCheckWithConfig (t) {
}
// , (err, results) {} // https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#results-object
);
await t.expect(violations.length === 0).ok(createReport(violations));
}
fixture`TestCafe Axe accessibility tests (Editor - no parameters)`