@sa11y/jest 6.10.2 → 6.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automatic.d.ts +1 -0
- package/dist/automatic.d.ts.map +1 -1
- package/dist/automatic.js +13 -17
- package/dist/groupViolationResultsProcessor.d.ts +16 -0
- package/dist/groupViolationResultsProcessor.d.ts.map +1 -1
- package/dist/groupViolationResultsProcessor.js +6 -1
- package/dist/matcher.d.ts.map +1 -1
- package/dist/matcher.js +1 -2
- package/dist/setup.d.ts +0 -7
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +3 -37
- package/package.json +7 -7
package/dist/automatic.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type AutoCheckOpts = {
|
|
|
7
7
|
consolidateResults?: boolean;
|
|
8
8
|
filesFilter?: string[];
|
|
9
9
|
runDOMMutationObserver?: boolean;
|
|
10
|
+
enableIncompleteResults?: boolean;
|
|
10
11
|
};
|
|
11
12
|
export declare const setOriginalDocumentBodyHtml: (bodyHtml: string | null) => void;
|
|
12
13
|
export declare const getOriginalDocumentBodyHtml: () => string | null;
|
package/dist/automatic.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automatic.d.ts","sourceRoot":"","sources":["../src/automatic.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"automatic.d.ts","sourceRoot":"","sources":["../src/automatic.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAI7B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAkBF,eAAO,MAAM,2BAA2B,aAAc,MAAM,GAAG,IAAI,SAElE,CAAC;AAEF,eAAO,MAAM,2BAA2B,qBAEvC,CAAC;AAEF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAUtF;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,IAAI,GAAE,aAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,CAmE9F;AAsBD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,GAAE,aAAoC,GAAG,IAAI,CAmB7F"}
|
package/dist/automatic.js
CHANGED
|
@@ -12,7 +12,6 @@ const assert_1 = require("@sa11y/assert");
|
|
|
12
12
|
const format_1 = require("@sa11y/format");
|
|
13
13
|
const matcher_1 = require("./matcher");
|
|
14
14
|
const globals_1 = require("@jest/globals");
|
|
15
|
-
const setup_1 = require("./setup");
|
|
16
15
|
const preset_rules_1 = require("@sa11y/preset-rules");
|
|
17
16
|
/**
|
|
18
17
|
* Default options when {@link registerSa11yAutomaticChecks} is invoked
|
|
@@ -23,6 +22,7 @@ const defaultAutoCheckOpts = {
|
|
|
23
22
|
consolidateResults: true,
|
|
24
23
|
filesFilter: [],
|
|
25
24
|
runDOMMutationObserver: false,
|
|
25
|
+
enableIncompleteResults: false,
|
|
26
26
|
};
|
|
27
27
|
let originalDocumentBodyHtml = null;
|
|
28
28
|
let mutatedNodes = [];
|
|
@@ -59,7 +59,13 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
59
59
|
(0, common_1.log)('Skipping automatic accessibility check as Jest fake timer is in use.');
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
const customRules = (0, common_1.useCustomRules)();
|
|
63
|
+
let config = customRules.length === 0
|
|
64
|
+
? (0, preset_rules_1.adaptA11yConfig)(preset_rules_1.defaultRuleset)
|
|
65
|
+
: (0, preset_rules_1.adaptA11yConfigCustomRules)(preset_rules_1.defaultRuleset, customRules);
|
|
66
|
+
if (opts.enableIncompleteResults)
|
|
67
|
+
config = (0, preset_rules_1.adaptA11yConfigIncompleteResults)(config);
|
|
68
|
+
let a11yResults = [];
|
|
63
69
|
const currentDocumentHtml = document.body.innerHTML;
|
|
64
70
|
if (originalDocumentBodyHtml) {
|
|
65
71
|
document.body.innerHTML = originalDocumentBodyHtml;
|
|
@@ -67,7 +73,6 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
67
73
|
// Create a DOM walker filtering only elements (skipping text, comment nodes etc)
|
|
68
74
|
const walker = document.createTreeWalker(document.body, NodeFilter.SHOW_ELEMENT);
|
|
69
75
|
let currNode = walker.firstChild();
|
|
70
|
-
const customRules = (0, common_1.useCustomRules)();
|
|
71
76
|
try {
|
|
72
77
|
if (!opts.runDOMMutationObserver) {
|
|
73
78
|
while (currNode !== null) {
|
|
@@ -78,27 +83,18 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
78
83
|
// : ${testPath}`
|
|
79
84
|
// );
|
|
80
85
|
// W-10004832 - Exclude descendancy based rules from automatic checks
|
|
81
|
-
|
|
82
|
-
violations.push(...(await (0, assert_1.getViolationsJSDOM)(currNode, (0, setup_1.adaptA11yConfig)(preset_rules_1.defaultRuleset))));
|
|
83
|
-
else
|
|
84
|
-
violations.push(...(await (0, assert_1.getViolationsJSDOM)(currNode, (0, setup_1.adaptA11yConfigCustomRules)(preset_rules_1.defaultRuleset, customRules))));
|
|
86
|
+
a11yResults.push(...(await (0, assert_1.getA11yResultsJSDOM)(currNode, config, opts.enableIncompleteResults)));
|
|
85
87
|
currNode = walker.nextSibling();
|
|
86
88
|
}
|
|
87
89
|
}
|
|
88
90
|
else {
|
|
89
|
-
|
|
90
|
-
violations.push(...(await (0, assert_1.getViolationsJSDOM)(document.body, (0, setup_1.adaptA11yConfig)(preset_rules_1.defaultRuleset))));
|
|
91
|
-
else
|
|
92
|
-
violations.push(...(await (0, assert_1.getViolationsJSDOM)(document.body, (0, setup_1.adaptA11yConfigCustomRules)(preset_rules_1.defaultRuleset, customRules))));
|
|
91
|
+
a11yResults.push(...(await (0, assert_1.getA11yResultsJSDOM)(document.body, config, opts.enableIncompleteResults)));
|
|
93
92
|
document.body.innerHTML = '';
|
|
94
93
|
// loop mutated nodes
|
|
95
94
|
for await (const mutatedNode of mutatedNodes) {
|
|
96
95
|
if (mutatedNode) {
|
|
97
96
|
document.body.innerHTML = mutatedNode;
|
|
98
|
-
|
|
99
|
-
violations.push(...(await (0, assert_1.getViolationsJSDOM)(document.body, (0, setup_1.adaptA11yConfig)(preset_rules_1.defaultRuleset))));
|
|
100
|
-
else
|
|
101
|
-
violations.push(...(await (0, assert_1.getViolationsJSDOM)(document.body, (0, setup_1.adaptA11yConfigCustomRules)(preset_rules_1.defaultRuleset, customRules))));
|
|
97
|
+
a11yResults.push(...(await (0, assert_1.getA11yResultsJSDOM)(document.body, config, opts.enableIncompleteResults)));
|
|
102
98
|
}
|
|
103
99
|
}
|
|
104
100
|
}
|
|
@@ -115,9 +111,9 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
115
111
|
// Will this affect all errors globally?
|
|
116
112
|
// Error.stackTraceLimit = 0;
|
|
117
113
|
if (process.env.SELECTOR_FILTER_KEYWORDS) {
|
|
118
|
-
|
|
114
|
+
a11yResults = (0, format_1.exceptionListFilterSelectorKeywords)(a11yResults, process.env.SELECTOR_FILTER_KEYWORDS.split(','));
|
|
119
115
|
}
|
|
120
|
-
format_1.A11yError.checkAndThrow(
|
|
116
|
+
format_1.A11yError.checkAndThrow(a11yResults, { deduplicate: opts.consolidateResults });
|
|
121
117
|
}
|
|
122
118
|
}
|
|
123
119
|
exports.automaticCheck = automaticCheck;
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import { AggregatedResult } from '@jest/test-result';
|
|
2
|
+
export type ErrorElement = {
|
|
3
|
+
html: string;
|
|
4
|
+
selectors: string;
|
|
5
|
+
hierarchy: string;
|
|
6
|
+
any: string;
|
|
7
|
+
all: string;
|
|
8
|
+
none: string;
|
|
9
|
+
relatedNodeAny: string;
|
|
10
|
+
relatedNodeAll: string;
|
|
11
|
+
relatedNodeNone: string;
|
|
12
|
+
message?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Create a test failure html elements array grouped by rule violation
|
|
16
|
+
*/
|
|
17
|
+
export declare function createA11yErrorElements(errorElements: ErrorElement[]): string;
|
|
2
18
|
/**
|
|
3
19
|
* Custom results processor for a11y results grouping the violations. Only affects JSON results file output.
|
|
4
20
|
* To be used with jest cli options --json --outputFile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groupViolationResultsProcessor.d.ts","sourceRoot":"","sources":["../src/groupViolationResultsProcessor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAA+B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"groupViolationResultsProcessor.d.ts","sourceRoot":"","sources":["../src/groupViolationResultsProcessor.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAA+B,MAAM,mBAAmB,CAAC;AAelF,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAoBF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,aAAa,EAAE,YAAY,EAAE,UAqDpE;AA2GD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAa5E;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAaxF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resultsProcessorManualChecks = exports.resultsProcessor = void 0;
|
|
3
|
+
exports.resultsProcessorManualChecks = exports.resultsProcessor = exports.createA11yErrorElements = void 0;
|
|
4
4
|
const common_1 = require("@sa11y/common");
|
|
5
5
|
const format_1 = require("@sa11y/format");
|
|
6
6
|
const formatSpacing = '\t'.repeat(4);
|
|
@@ -26,6 +26,8 @@ function createA11yErrorElements(errorElements) {
|
|
|
26
26
|
.replace(/>/, '>')}`;
|
|
27
27
|
errorMessage += `${formatForAxeMessage}- CSS selector(s) : ${errorElement.selectors.replace(/>/, '>')}`;
|
|
28
28
|
errorMessage += `${formatForAxeMessage}- HTML Tag Hierarchy : ${errorElement.hierarchy}`;
|
|
29
|
+
if (errorElement.message)
|
|
30
|
+
errorMessage += `${formatForAxeMessage}- Error Message (Needs Review) : ${errorElement.message}`;
|
|
29
31
|
const isAny = errorElement.any?.length > 0;
|
|
30
32
|
const isAll = errorElement.all?.length > 0;
|
|
31
33
|
const isNone = errorElement.none?.length > 0;
|
|
@@ -65,6 +67,7 @@ function createA11yErrorElements(errorElements) {
|
|
|
65
67
|
});
|
|
66
68
|
return a11yErrorElements.join('\n');
|
|
67
69
|
}
|
|
70
|
+
exports.createA11yErrorElements = createA11yErrorElements;
|
|
68
71
|
/**
|
|
69
72
|
* Create a test failure violation error message grouped by rule violation
|
|
70
73
|
*/
|
|
@@ -106,6 +109,7 @@ function processA11yDetailsAndMessages(error, a11yFailureMessages) {
|
|
|
106
109
|
relatedNodeAny: a11yResult.relatedNodeAny,
|
|
107
110
|
relatedNodeAll: a11yResult.relatedNodeAll,
|
|
108
111
|
relatedNodeNone: a11yResult.relatedNodeNone,
|
|
112
|
+
message: a11yResult?.message,
|
|
109
113
|
});
|
|
110
114
|
});
|
|
111
115
|
const a11yFailureMessage = `
|
|
@@ -204,6 +208,7 @@ exports.resultsProcessorManualChecks = resultsProcessorManualChecks;
|
|
|
204
208
|
const exportedFunctions = {
|
|
205
209
|
resultsProcessor,
|
|
206
210
|
resultsProcessorManualChecks,
|
|
211
|
+
createA11yErrorElements,
|
|
207
212
|
};
|
|
208
213
|
module.exports = exportedFunctions;
|
|
209
214
|
//# sourceMappingURL=groupViolationResultsProcessor.js.map
|
package/dist/matcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../src/matcher.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../src/matcher.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,oBAAoB,EAAoB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,SAAS,EAAW,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,CAAC,MAAM,CAAC;IAEX,UAAU,IAAI,CAAC;QAEX,UAAU,QAAQ,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,aAAa;YAC5C,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;SACrE;KACJ;CACJ;AAeD;;;;GAIG;AACH,wBAAsB,cAAc,CAChC,QAAQ,GAAE,oBAA+B,EACzC,MAAM,GAAE,UAA2B,GACpC,OAAO,CAAC,IAAI,CAAC,mBAAmB,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC,CA+B9D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAO9C"}
|
package/dist/matcher.js
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.isTestUsingFakeTimer = exports.toBeAccessible = void 0;
|
|
10
10
|
const jest_matcher_utils_1 = require("jest-matcher-utils");
|
|
11
|
-
const setup_1 = require("./setup");
|
|
12
11
|
const assert_1 = require("@sa11y/assert");
|
|
13
12
|
const format_1 = require("@sa11y/format");
|
|
14
13
|
const preset_rules_1 = require("@sa11y/preset-rules");
|
|
@@ -37,7 +36,7 @@ async function toBeAccessible(received = document, config = preset_rules_1.defau
|
|
|
37
36
|
throw new Error(fakeTimerErrMsg);
|
|
38
37
|
// TODO (Improvement): Can we detect if this is invoked async and error if not ?
|
|
39
38
|
try {
|
|
40
|
-
await (0, assert_1.assertAccessible)(received, (0,
|
|
39
|
+
await (0, assert_1.assertAccessible)(received, (0, preset_rules_1.adaptA11yConfig)(config));
|
|
41
40
|
}
|
|
42
41
|
catch (e) {
|
|
43
42
|
if (e instanceof format_1.A11yError) {
|
package/dist/setup.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { A11yConfig } from '@sa11y/common';
|
|
2
1
|
import { AutoCheckOpts } from './automatic';
|
|
3
|
-
export declare const disabledRules: string[];
|
|
4
2
|
/**
|
|
5
3
|
* Options to be passed on to {@link setup}
|
|
6
4
|
*/
|
|
@@ -16,9 +14,4 @@ export declare function setup(opts?: Sa11yOpts): void;
|
|
|
16
14
|
* Register accessibility helpers toBeAccessible as jest matchers
|
|
17
15
|
*/
|
|
18
16
|
export declare function registerSa11yMatcher(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Customize sa11y preset rules specific to JSDOM
|
|
21
|
-
*/
|
|
22
|
-
export declare function adaptA11yConfigCustomRules(config: A11yConfig, customRules: string[]): A11yConfig;
|
|
23
|
-
export declare function adaptA11yConfig(config: A11yConfig, filterRules?: string[]): A11yConfig;
|
|
24
17
|
//# sourceMappingURL=setup.d.ts.map
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AASA,OAAO,EACH,aAAa,EAIhB,MAAM,aAAa,CAAC;AAIrB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACpB,aAAa,EAAE,aAAa,CAAC;CAKhC,CAAC;AAoCF;;;GAGG;AACH,wBAAgB,KAAK,CAAC,IAAI,GAAE,SAA4B,GAAG,IAAI,CAiD9D;AACD;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAU3C"}
|
package/dist/setup.js
CHANGED
|
@@ -6,30 +6,12 @@
|
|
|
6
6
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.registerSa11yMatcher = exports.setup = void 0;
|
|
10
10
|
const matcher_1 = require("./matcher");
|
|
11
11
|
const common_1 = require("@sa11y/common");
|
|
12
12
|
const automatic_1 = require("./automatic");
|
|
13
13
|
const globals_1 = require("@jest/globals");
|
|
14
14
|
const preset_rules_1 = require("@sa11y/preset-rules");
|
|
15
|
-
exports.disabledRules = [
|
|
16
|
-
// Descendancy checks that would fail at unit/component level, but pass at page level
|
|
17
|
-
'aria-required-children',
|
|
18
|
-
'aria-required-parent',
|
|
19
|
-
'dlitem',
|
|
20
|
-
'definition-list',
|
|
21
|
-
'list',
|
|
22
|
-
'listitem',
|
|
23
|
-
'landmark-one-main',
|
|
24
|
-
// color-contrast doesn't work for JSDOM and might affect performance
|
|
25
|
-
// https://github.com/dequelabs/axe-core/issues/595
|
|
26
|
-
// https://github.com/dequelabs/axe-core/blob/develop/doc/examples/jsdom/test/a11y.js
|
|
27
|
-
'color-contrast',
|
|
28
|
-
// audio, video elements are stubbed out in JSDOM
|
|
29
|
-
// https://github.com/jsdom/jsdom/issues/2155
|
|
30
|
-
'audio-caption',
|
|
31
|
-
'video-caption',
|
|
32
|
-
];
|
|
33
15
|
/**
|
|
34
16
|
* Default options for sa11y jest matcher
|
|
35
17
|
*/
|
|
@@ -39,6 +21,7 @@ const defaultSa11yOpts = {
|
|
|
39
21
|
cleanupAfterEach: false,
|
|
40
22
|
consolidateResults: false,
|
|
41
23
|
runDOMMutationObserver: false,
|
|
24
|
+
enableIncompleteResults: false,
|
|
42
25
|
},
|
|
43
26
|
};
|
|
44
27
|
function registerRemoveChild() {
|
|
@@ -106,6 +89,7 @@ function setup(opts = defaultSa11yOpts) {
|
|
|
106
89
|
]);
|
|
107
90
|
// set the flag to true to run sa11y in DOM Mutation Observer mode
|
|
108
91
|
autoCheckOpts.runDOMMutationObserver || (autoCheckOpts.runDOMMutationObserver = !!process.env.SA11Y_ENABLE_DOM_MUTATION_OBSERVER);
|
|
92
|
+
autoCheckOpts.enableIncompleteResults || (autoCheckOpts.enableIncompleteResults = !!process.env.SA11Y_ENABLE_INCOMPLETE_RESULTS);
|
|
109
93
|
(0, automatic_1.registerSa11yAutomaticChecks)(autoCheckOpts);
|
|
110
94
|
}
|
|
111
95
|
exports.setup = setup;
|
|
@@ -123,22 +107,4 @@ function registerSa11yMatcher() {
|
|
|
123
107
|
}
|
|
124
108
|
}
|
|
125
109
|
exports.registerSa11yMatcher = registerSa11yMatcher;
|
|
126
|
-
/**
|
|
127
|
-
* Customize sa11y preset rules specific to JSDOM
|
|
128
|
-
*/
|
|
129
|
-
function adaptA11yConfigCustomRules(config, customRules) {
|
|
130
|
-
const adaptedConfig = JSON.parse(JSON.stringify(config));
|
|
131
|
-
adaptedConfig.runOnly.values = customRules;
|
|
132
|
-
adaptedConfig.ancestry = true;
|
|
133
|
-
return adaptedConfig;
|
|
134
|
-
}
|
|
135
|
-
exports.adaptA11yConfigCustomRules = adaptA11yConfigCustomRules;
|
|
136
|
-
function adaptA11yConfig(config, filterRules = exports.disabledRules) {
|
|
137
|
-
// TODO (refactor): Move into preset-rules pkg as a generic rules filter util
|
|
138
|
-
const adaptedConfig = JSON.parse(JSON.stringify(config));
|
|
139
|
-
adaptedConfig.runOnly.values = config.runOnly.values.filter((rule) => !filterRules.includes(rule));
|
|
140
|
-
adaptedConfig.ancestry = true;
|
|
141
|
-
return adaptedConfig;
|
|
142
|
-
}
|
|
143
|
-
exports.adaptA11yConfig = adaptA11yConfig;
|
|
144
110
|
//# sourceMappingURL=setup.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sa11y/jest",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0",
|
|
4
4
|
"description": "Accessibility testing matcher for Jest",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"homepage": "https://github.com/salesforce/sa11y/tree/master/packages/jest#readme",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@jest/test-result": "^27",
|
|
27
|
-
"@sa11y/assert": "6.
|
|
28
|
-
"@sa11y/format": "6.
|
|
29
|
-
"@sa11y/preset-rules": "6.
|
|
27
|
+
"@sa11y/assert": "6.11.0",
|
|
28
|
+
"@sa11y/format": "6.11.0",
|
|
29
|
+
"@sa11y/preset-rules": "6.11.0",
|
|
30
30
|
"jest-matcher-utils": "^27"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@jest/globals": "28.1.3",
|
|
37
|
-
"@sa11y/common": "6.
|
|
38
|
-
"@sa11y/test-utils": "6.
|
|
37
|
+
"@sa11y/common": "6.11.0",
|
|
38
|
+
"@sa11y/test-utils": "6.11.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": "^16 || ^18 || ^20"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "2fe695a0b593b37e4f126e586348c1b5ce0bd624"
|
|
47
47
|
}
|