@sa11y/jest 6.10.2-alpha.2 → 6.10.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;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAiBF,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;IACvB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAiBF,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,CAiF9F;AAsBD;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,GAAE,aAAoC,GAAG,IAAI,CAmB7F"}
|
package/dist/automatic.js
CHANGED
|
@@ -103,12 +103,6 @@ async function automaticCheck(opts = defaultAutoCheckOpts) {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
catch (e) {
|
|
107
|
-
// TODO - remove after validation on custom ruleset AB
|
|
108
|
-
if (process.env.SA11Y_CUSTOM_RULES) {
|
|
109
|
-
format_1.AxeError.throwAxeError(e);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
106
|
finally {
|
|
113
107
|
if (opts.runDOMMutationObserver) {
|
|
114
108
|
mutatedNodes = [];
|
|
@@ -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;AA6MlF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAa5E;AAED,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB,CAaxF"}
|
|
@@ -129,10 +129,8 @@ For guidance on accessibility related specifics, contact our A11y team: http://s
|
|
|
129
129
|
*/
|
|
130
130
|
function processA11yErrors(results, testSuite, testResult) {
|
|
131
131
|
const a11yFailureDetails = [];
|
|
132
|
-
const axeFailureDetails = [];
|
|
133
132
|
const a11yFailureMessages = [];
|
|
134
|
-
|
|
135
|
-
let a11yAxeErrorsExist = false;
|
|
133
|
+
let a11yErrorsExist = false;
|
|
136
134
|
testResult.failureDetails.forEach((failure) => {
|
|
137
135
|
let error = failure.error;
|
|
138
136
|
// If using circus test runner https://github.com/facebook/jest/issues/11405#issuecomment-843549606
|
|
@@ -141,28 +139,20 @@ function processA11yErrors(results, testSuite, testResult) {
|
|
|
141
139
|
if (error === undefined)
|
|
142
140
|
error = failure;
|
|
143
141
|
if (error.name === format_1.A11yError.name) {
|
|
144
|
-
|
|
142
|
+
a11yErrorsExist = true;
|
|
145
143
|
a11yFailureDetails.push({ ...failure });
|
|
146
144
|
processA11yDetailsAndMessages(error, a11yFailureMessages);
|
|
147
145
|
}
|
|
148
|
-
if (error.name === format_1.AxeError.name) {
|
|
149
|
-
a11yAxeErrorsExist = true;
|
|
150
|
-
axeFailureDetails.push({ ...failure });
|
|
151
|
-
axeFailureMessages.push(`
|
|
152
|
-
The test has failed to execute the accessibility check.
|
|
153
|
-
Please contact our Sa11y team: http://sfdc.co/sa11y-users
|
|
154
|
-
`);
|
|
155
|
-
}
|
|
156
146
|
});
|
|
157
|
-
if (!
|
|
147
|
+
if (!a11yErrorsExist) {
|
|
158
148
|
testSuite.numFailingTests -= 1;
|
|
159
149
|
results.numFailedTests -= 1;
|
|
160
150
|
if (testSuite.numFailingTests === 0)
|
|
161
151
|
results.numFailedTestSuites -= 1;
|
|
162
152
|
}
|
|
163
|
-
testResult.failureDetails = [...a11yFailureDetails
|
|
164
|
-
testResult.failureMessages = [...a11yFailureMessages
|
|
165
|
-
testResult.status =
|
|
153
|
+
testResult.failureDetails = [...a11yFailureDetails];
|
|
154
|
+
testResult.failureMessages = [...a11yFailureMessages];
|
|
155
|
+
testResult.status = a11yFailureDetails.length === 0 ? 'passed' : testResult.status;
|
|
166
156
|
}
|
|
167
157
|
function processA11yMatcherErrors(results, testSuite, testResult) {
|
|
168
158
|
const a11yFailureMessages = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sa11y/jest",
|
|
3
|
-
"version": "6.10.2
|
|
3
|
+
"version": "6.10.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.10.2
|
|
28
|
-
"@sa11y/format": "6.10.2
|
|
29
|
-
"@sa11y/preset-rules": "6.10.2
|
|
27
|
+
"@sa11y/assert": "6.10.2",
|
|
28
|
+
"@sa11y/format": "6.10.2",
|
|
29
|
+
"@sa11y/preset-rules": "6.10.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.10.2
|
|
38
|
-
"@sa11y/test-utils": "6.10.2
|
|
37
|
+
"@sa11y/common": "6.10.2",
|
|
38
|
+
"@sa11y/test-utils": "6.10.2"
|
|
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": "65768ad5f397356dcebdcd79f8459d4f3fd9d5a0"
|
|
47
47
|
}
|