- 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:
@@ -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)`
|
||||
|
||||
Reference in New Issue
Block a user