@sa11y/jest 6.13.0 → 7.1.0-alpha.1
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":"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,
|
|
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,CAqE9F;AAsBD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,GAAE,aAAoC,GAAG,IAAI,CAmB7F"}
|
package/dist/automatic.js
CHANGED
|
@@ -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;AAoBlF,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;AAsHD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAa5E;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAaxF"}
|
|
@@ -133,8 +133,10 @@ For guidance on accessibility related specifics, contact our A11y team: http://s
|
|
|
133
133
|
*/
|
|
134
134
|
function processA11yErrors(results, testSuite, testResult) {
|
|
135
135
|
const a11yFailureDetails = [];
|
|
136
|
+
const axeFailureDetails = [];
|
|
136
137
|
const a11yFailureMessages = [];
|
|
137
|
-
|
|
138
|
+
const axeFailureMessages = [];
|
|
139
|
+
let a11yAxeErrorsExist = false;
|
|
138
140
|
testResult.failureDetails.forEach((failure) => {
|
|
139
141
|
let error = failure.error;
|
|
140
142
|
// If using circus test runner https://github.com/facebook/jest/issues/11405#issuecomment-843549606
|
|
@@ -143,20 +145,28 @@ function processA11yErrors(results, testSuite, testResult) {
|
|
|
143
145
|
if (error === undefined)
|
|
144
146
|
error = failure;
|
|
145
147
|
if (error.name === format_1.A11yError.name) {
|
|
146
|
-
|
|
148
|
+
a11yAxeErrorsExist = true;
|
|
147
149
|
a11yFailureDetails.push({ ...failure });
|
|
148
150
|
processA11yDetailsAndMessages(error, a11yFailureMessages);
|
|
149
151
|
}
|
|
152
|
+
if (error.name === format_1.AxeError.name) {
|
|
153
|
+
a11yAxeErrorsExist = true;
|
|
154
|
+
axeFailureDetails.push({ ...failure });
|
|
155
|
+
axeFailureMessages.push(`
|
|
156
|
+
The test has failed to execute the accessibility check.
|
|
157
|
+
Please contact our Sa11y team: http://sfdc.co/sa11y-users
|
|
158
|
+
`);
|
|
159
|
+
}
|
|
150
160
|
});
|
|
151
|
-
if (!
|
|
161
|
+
if (!a11yAxeErrorsExist) {
|
|
152
162
|
testSuite.numFailingTests -= 1;
|
|
153
163
|
results.numFailedTests -= 1;
|
|
154
164
|
if (testSuite.numFailingTests === 0)
|
|
155
165
|
results.numFailedTestSuites -= 1;
|
|
156
166
|
}
|
|
157
|
-
testResult.failureDetails = [...a11yFailureDetails];
|
|
158
|
-
testResult.failureMessages = [...a11yFailureMessages];
|
|
159
|
-
testResult.status =
|
|
167
|
+
testResult.failureDetails = [...a11yFailureDetails, ...axeFailureDetails];
|
|
168
|
+
testResult.failureMessages = [...a11yFailureMessages, ...axeFailureMessages];
|
|
169
|
+
testResult.status = testResult.failureDetails.length === 0 ? 'passed' : testResult.status;
|
|
160
170
|
}
|
|
161
171
|
function processA11yMatcherErrors(results, testSuite, testResult) {
|
|
162
172
|
const a11yFailureMessages = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sa11y/jest",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.1.0-alpha.1",
|
|
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": "
|
|
28
|
-
"@sa11y/format": "
|
|
29
|
-
"@sa11y/preset-rules": "
|
|
27
|
+
"@sa11y/assert": "7.1.0-alpha.1",
|
|
28
|
+
"@sa11y/format": "7.1.0-alpha.1",
|
|
29
|
+
"@sa11y/preset-rules": "7.1.0-alpha.1",
|
|
30
30
|
"jest-matcher-utils": "^27"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@jest/globals": "28.1.3",
|
|
37
|
-
"@sa11y/common": "
|
|
38
|
-
"@sa11y/test-utils": "
|
|
37
|
+
"@sa11y/common": "7.1.0-alpha.1",
|
|
38
|
+
"@sa11y/test-utils": "7.1.0-alpha.1"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": "^
|
|
44
|
+
"node": "^18 || ^20"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "d8b64c285f066b8dcc955882c5bf399ef6b1c279"
|
|
47
47
|
}
|