@sa11y/jest 6.6.0 → 6.6.2
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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"automatic.d.ts","sourceRoot":"","sources":["../src/automatic.ts"],"names":[],"mappings":"AAeA;;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;CAC1B,CAAC;AAcF,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,
|
|
1
|
+
{"version":3,"file":"automatic.d.ts","sourceRoot":"","sources":["../src/automatic.ts"],"names":[],"mappings":"AAeA;;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;CAC1B,CAAC;AAcF,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,CAkD9F;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,GAAE,aAAoC,GAAG,IAAI,CAQ7F"}
|
package/dist/automatic.js
CHANGED
|
@@ -82,9 +82,6 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
82
82
|
currNode = walker.nextSibling();
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
catch (e) {
|
|
86
|
-
format_1.AxeError.throwAxeError(e);
|
|
87
|
-
}
|
|
88
85
|
finally {
|
|
89
86
|
(0, exports.setOriginalDocumentBodyHtml)(null);
|
|
90
87
|
document.body.innerHTML = currentDocumentHtml;
|
|
@@ -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;AAsHlF;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAapF"}
|
|
@@ -30,10 +30,8 @@ function createA11yRuleViolation(a11yRule, ruleIndex) {
|
|
|
30
30
|
*/
|
|
31
31
|
function processA11yErrors(results, testSuite, testResult) {
|
|
32
32
|
const a11yFailureDetails = [];
|
|
33
|
-
const axeFailureDetails = [];
|
|
34
33
|
const a11yFailureMessages = [];
|
|
35
|
-
|
|
36
|
-
let a11yAxeErrorsExist = false;
|
|
34
|
+
let a11yErrorsExist = false;
|
|
37
35
|
testResult.failureDetails.forEach((failure) => {
|
|
38
36
|
let error = failure.error;
|
|
39
37
|
// If using circus test runner https://github.com/facebook/jest/issues/11405#issuecomment-843549606
|
|
@@ -42,7 +40,7 @@ function processA11yErrors(results, testSuite, testResult) {
|
|
|
42
40
|
if (error === undefined)
|
|
43
41
|
error = failure;
|
|
44
42
|
if (error.name === format_1.A11yError.name) {
|
|
45
|
-
|
|
43
|
+
a11yErrorsExist = true;
|
|
46
44
|
a11yFailureDetails.push({ ...failure });
|
|
47
45
|
const a11yRuleViolations = {};
|
|
48
46
|
let a11yRuleViolationsCount = 0;
|
|
@@ -81,24 +79,16 @@ function processA11yErrors(results, testSuite, testResult) {
|
|
|
81
79
|
`;
|
|
82
80
|
a11yFailureMessages.push(a11yFailureMessage);
|
|
83
81
|
}
|
|
84
|
-
if (error.name === format_1.AxeError.name) {
|
|
85
|
-
a11yAxeErrorsExist = true;
|
|
86
|
-
axeFailureDetails.push({ ...failure });
|
|
87
|
-
axeFailureMessages.push(`
|
|
88
|
-
The test has failed to execute the accessibility check.
|
|
89
|
-
Please contact our Sa11y team: http://sfdc.co/sa11y-users
|
|
90
|
-
`);
|
|
91
|
-
}
|
|
92
82
|
});
|
|
93
|
-
if (!
|
|
83
|
+
if (!a11yErrorsExist) {
|
|
94
84
|
testSuite.numFailingTests -= 1;
|
|
95
85
|
results.numFailedTests -= 1;
|
|
96
86
|
if (testSuite.numFailingTests === 0)
|
|
97
87
|
results.numFailedTestSuites -= 1;
|
|
98
88
|
}
|
|
99
|
-
testResult.failureDetails = [...a11yFailureDetails
|
|
100
|
-
testResult.failureMessages = [...a11yFailureMessages
|
|
101
|
-
testResult.status =
|
|
89
|
+
testResult.failureDetails = [...a11yFailureDetails];
|
|
90
|
+
testResult.failureMessages = [...a11yFailureMessages];
|
|
91
|
+
testResult.status = a11yFailureDetails.length === 0 ? 'passed' : testResult.status;
|
|
102
92
|
}
|
|
103
93
|
/**
|
|
104
94
|
* Custom results processor for a11y results grouping the violations. Only affects JSON results file output.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sa11y/jest",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.2",
|
|
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.6.
|
|
28
|
-
"@sa11y/format": "6.6.
|
|
29
|
-
"@sa11y/preset-rules": "6.6.
|
|
27
|
+
"@sa11y/assert": "6.6.2",
|
|
28
|
+
"@sa11y/format": "6.6.2",
|
|
29
|
+
"@sa11y/preset-rules": "6.6.2",
|
|
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.6.
|
|
38
|
-
"@sa11y/test-utils": "6.6.
|
|
37
|
+
"@sa11y/common": "6.6.2",
|
|
38
|
+
"@sa11y/test-utils": "6.6.2"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": "^16 || ^18"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "03c66b2df14c3d80601e50e911a3eb40e8b5cbcd"
|
|
47
47
|
}
|