@axe-core/watcher 3.16.0-next.acef2936 → 3.16.0-next.b13ee293

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. package/LICENSES-3RD-PARTY.md +720 -0
  2. package/dist/Controller.d.ts +1 -1
  3. package/dist/Controller.js +42 -34
  4. package/dist/Controller.js.map +1 -1
  5. package/dist/cypress.js +2 -0
  6. package/dist/cypress.js.map +1 -1
  7. package/dist/cypressCommands.js +3 -0
  8. package/dist/cypressCommands.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/playwright.d.ts +1 -1
  12. package/dist/playwright.js +4 -1
  13. package/dist/playwright.js.map +1 -1
  14. package/dist/playwrightTest.d.ts +9 -3
  15. package/dist/playwrightTest.js +10 -5
  16. package/dist/playwrightTest.js.map +1 -1
  17. package/dist/puppeteer.js +2 -0
  18. package/dist/puppeteer.js.map +1 -1
  19. package/dist/utils/checkUserArgs.d.ts +8 -0
  20. package/dist/utils/checkUserArgs.js +10 -0
  21. package/dist/utils/checkUserArgs.js.map +1 -0
  22. package/dist/wdio.js +3 -0
  23. package/dist/wdio.js.map +1 -1
  24. package/dist/webdriver.js +2 -0
  25. package/dist/webdriver.js.map +1 -1
  26. package/extension/axe.js +1 -1
  27. package/extension/axe.js.LICENSE.txt +1 -1
  28. package/extension/background.js +1 -1
  29. package/extension/content.js +1 -1
  30. package/package.json +5 -4
  31. package/dist/testutils.d.ts +0 -13
  32. package/dist/testutils.js +0 -50
  33. package/dist/testutils.js.map +0 -1
  34. package/dist/utils/assertVariablesWereWritten.test.d.ts +0 -1
  35. package/dist/utils/assertVariablesWereWritten.test.js +0 -31
  36. package/dist/utils/assertVariablesWereWritten.test.js.map +0 -1
  37. package/dist/utils/headlessNotSupportedError.test.d.ts +0 -1
  38. package/dist/utils/headlessNotSupportedError.test.js +0 -21
  39. package/dist/utils/headlessNotSupportedError.test.js.map +0 -1
  40. package/dist/utils/initializeSession.test.d.ts +0 -1
  41. package/dist/utils/initializeSession.test.js +0 -177
  42. package/dist/utils/initializeSession.test.js.map +0 -1
  43. package/dist/utils/isValidExcludePattern.test.d.ts +0 -1
  44. package/dist/utils/isValidExcludePattern.test.js +0 -17
  45. package/dist/utils/isValidExcludePattern.test.js.map +0 -1
  46. package/dist/utils/mergeChromeArgs.test.d.ts +0 -1
  47. package/dist/utils/mergeChromeArgs.test.js +0 -257
  48. package/dist/utils/mergeChromeArgs.test.js.map +0 -1
  49. package/dist/utils/proxyHandlers.test.d.ts +0 -1
  50. package/dist/utils/proxyHandlers.test.js +0 -27
  51. package/dist/utils/proxyHandlers.test.js.map +0 -1
  52. package/dist/utils/validateAxeRunContext.test.d.ts +0 -1
  53. package/dist/utils/validateAxeRunContext.test.js +0 -97
  54. package/dist/utils/validateAxeRunContext.test.js.map +0 -1
  55. package/dist/utils/validateAxeRunOptions.test.d.ts +0 -1
  56. package/dist/utils/validateAxeRunOptions.test.js +0 -215
  57. package/dist/utils/validateAxeRunOptions.test.js.map +0 -1
  58. package/dist/utils/writeVariables.test.d.ts +0 -1
  59. package/dist/utils/writeVariables.test.js +0 -200
  60. package/dist/utils/writeVariables.test.js.map +0 -1
@@ -1,257 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- require("mocha");
7
- const chai_1 = require("chai");
8
- const constants_1 = require("./constants");
9
- const mergeChromeArgs_1 = __importDefault(require("./mergeChromeArgs"));
10
- describe('mergeChromeArgs', () => {
11
- describe('given the user has not provided any args', () => {
12
- describe('when `disableOtherExtensions` is true', () => {
13
- it('returns the `--load-extension` when `--disable-extensions-except` flags', () => {
14
- const args = (0, mergeChromeArgs_1.default)([], {
15
- disableOtherExtensions: true
16
- });
17
- const [loadExtension, disableExtensionsExcept] = args;
18
- chai_1.assert.lengthOf(args, 2);
19
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
20
- chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
21
- });
22
- });
23
- describe('and `disableOtherExtensions` is false', () => {
24
- it('only returns the `--load-extension` flag', () => {
25
- const args = (0, mergeChromeArgs_1.default)([], {
26
- disableOtherExtensions: false
27
- });
28
- const [loadExtension] = args;
29
- chai_1.assert.lengthOf(args, 1);
30
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
31
- });
32
- });
33
- });
34
- describe('given the user has provided args', () => {
35
- describe('when the user has not provided extension flags', () => {
36
- describe('when `disableOtherExtensions` is true', () => {
37
- describe('and the user args and not prefixed with `--`', () => {
38
- it('does not modify the user provided args and appends the extension flags', () => {
39
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'baz=qux,quz', 'quux'], {
40
- disableOtherExtensions: true
41
- });
42
- const [foo, baz, quux, loadExtension, disableExtensionsExcept] = args;
43
- chai_1.assert.lengthOf(args, 5);
44
- chai_1.assert.equal(foo, 'foo=bar');
45
- chai_1.assert.equal(baz, 'baz=qux,quz');
46
- chai_1.assert.equal(quux, 'quux');
47
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
48
- chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
49
- });
50
- describe('and the user adds multiple instances of the same flag', () => {
51
- it('does not modify the user provided args and appends the extension flags', () => {
52
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'foo=baz'], {
53
- disableOtherExtensions: true
54
- });
55
- const [foo1, foo2, loadExtension, disableExtensionsExcept] = args;
56
- chai_1.assert.lengthOf(args, 4);
57
- chai_1.assert.equal(foo1, 'foo=bar');
58
- chai_1.assert.equal(foo2, 'foo=baz');
59
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
60
- chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
61
- });
62
- describe('and some values are comma-separated', () => {
63
- it('does not modify the user provided args and appends the extension flags', () => {
64
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'foo=baz,qux'], {
65
- disableOtherExtensions: true
66
- });
67
- const [foo1, foo2, loadExtension, disableExtensionsExcept] = args;
68
- chai_1.assert.lengthOf(args, 4);
69
- chai_1.assert.equal(foo1, 'foo=bar');
70
- chai_1.assert.equal(foo2, 'foo=baz,qux');
71
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
72
- chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
73
- });
74
- });
75
- });
76
- });
77
- });
78
- describe('and `disableOtherExtensions` is false', () => {
79
- it('does not modify the user provided args and appends the extension flags', () => {
80
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'baz=qux,quz', 'quux'], {
81
- disableOtherExtensions: false
82
- });
83
- const [foo, baz, quux, loadExtension] = args;
84
- chai_1.assert.lengthOf(args, 4);
85
- chai_1.assert.equal(foo, 'foo=bar');
86
- chai_1.assert.equal(baz, 'baz=qux,quz');
87
- chai_1.assert.equal(quux, 'quux');
88
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
89
- });
90
- describe('and the user adds multiple instances of the same flag', () => {
91
- it('does not modify the user provided args and appends the extension flags', () => {
92
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'foo=baz'], {
93
- disableOtherExtensions: false
94
- });
95
- chai_1.assert.lengthOf(args, 3);
96
- const [foo1, foo2, loadExtension] = args;
97
- chai_1.assert.equal(foo1, 'foo=bar');
98
- chai_1.assert.equal(foo2, 'foo=baz');
99
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
100
- });
101
- describe('and some values are comma-separated', () => {
102
- it('does not modify the user provided args and appends the extension flags', () => {
103
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'foo=baz,qux'], {
104
- disableOtherExtensions: false
105
- });
106
- chai_1.assert.lengthOf(args, 3);
107
- const [foo1, foo2, loadExtension] = args;
108
- chai_1.assert.equal(foo1, 'foo=bar');
109
- chai_1.assert.equal(foo2, 'foo=baz,qux');
110
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
111
- });
112
- });
113
- });
114
- });
115
- });
116
- describe('when the user has provided extension flags', () => {
117
- describe('when `disableOtherExtensions` is true', () => {
118
- describe('and the user extension flags are not prefixed with `--`', () => {
119
- it('does not modify the user provided args and appends the extension flags', () => {
120
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'baz=qux,quz', 'quux', 'load-extension=foo'], {
121
- disableOtherExtensions: true
122
- });
123
- const [foo, baz, quux, loadExtension, disableExtensionsExcept] = args;
124
- chai_1.assert.lengthOf(args, 5);
125
- chai_1.assert.equal(foo, 'foo=bar');
126
- chai_1.assert.equal(baz, 'baz=qux,quz');
127
- chai_1.assert.equal(quux, 'quux');
128
- chai_1.assert.equal(loadExtension, `load-extension=foo,${constants_1.PATH_TO_EXTENSION}`);
129
- chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
130
- });
131
- describe('and the user adds multiple instances of the same flag', () => {
132
- it('does not modify the user provided args and appends the extension flags', () => {
133
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'load-extension=baz', 'load-extension=qux'], {
134
- disableOtherExtensions: true
135
- });
136
- const [foo, loadExtension1, loadExtension2, disableExtensionsExcept] = args;
137
- chai_1.assert.lengthOf(args, 4);
138
- chai_1.assert.equal(foo, 'foo=bar');
139
- chai_1.assert.equal(loadExtension1, 'load-extension=baz');
140
- chai_1.assert.equal(loadExtension2, `load-extension=qux,${constants_1.PATH_TO_EXTENSION}`);
141
- chai_1.assert.equal(disableExtensionsExcept, `--disable-extensions-except=${constants_1.PATH_TO_EXTENSION}`);
142
- });
143
- describe('and some values are comma-separated', () => {
144
- it('does not modify the user provided args and appends the extension flags', () => {
145
- const args = (0, mergeChromeArgs_1.default)([
146
- 'foo=bar',
147
- 'foo=baz,qux',
148
- 'load-extension=foo',
149
- 'disable-extensions-except=quz,quux'
150
- ], {
151
- disableOtherExtensions: true
152
- });
153
- const [foo1, foo2, loadExtension, disableExtensionsExcept] = args;
154
- chai_1.assert.lengthOf(args, 4);
155
- chai_1.assert.equal(foo1, 'foo=bar');
156
- chai_1.assert.equal(foo2, 'foo=baz,qux');
157
- chai_1.assert.equal(loadExtension, `load-extension=foo,${constants_1.PATH_TO_EXTENSION}`);
158
- chai_1.assert.equal(disableExtensionsExcept, `disable-extensions-except=quz,quux,${constants_1.PATH_TO_EXTENSION}`);
159
- });
160
- });
161
- });
162
- });
163
- });
164
- describe('and `disableOtherExtensions` is false', () => {
165
- it('does not modify the user provided args and appends the extension flags', () => {
166
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'baz=qux,quz', 'quux', 'load-extension=foo'], {
167
- disableOtherExtensions: false
168
- });
169
- const [foo, baz, quux, loadExtension] = args;
170
- chai_1.assert.lengthOf(args, 4);
171
- chai_1.assert.equal(foo, 'foo=bar');
172
- chai_1.assert.equal(baz, 'baz=qux,quz');
173
- chai_1.assert.equal(quux, 'quux');
174
- chai_1.assert.equal(loadExtension, `load-extension=foo,${constants_1.PATH_TO_EXTENSION}`);
175
- });
176
- describe('and the user adds multiple instances of the same flag', () => {
177
- it('does not modify the user provided args and appends the extension flags', () => {
178
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'load-extension=baz', 'load-extension=qux'], {
179
- disableOtherExtensions: false
180
- });
181
- const [foo, loadExtension1, loadExtension2] = args;
182
- chai_1.assert.lengthOf(args, 3);
183
- chai_1.assert.equal(foo, 'foo=bar');
184
- chai_1.assert.equal(loadExtension1, 'load-extension=baz');
185
- chai_1.assert.equal(loadExtension2, `load-extension=qux,${constants_1.PATH_TO_EXTENSION}`);
186
- });
187
- describe('and some values are comma-separated', () => {
188
- it('does not modify the user provided args and appends the extension flags', () => {
189
- const args = (0, mergeChromeArgs_1.default)(['foo=bar', 'foo=baz,qux', 'load-extension=foo,quz,quux'], {
190
- disableOtherExtensions: false
191
- });
192
- const [foo1, foo2, loadExtension] = args;
193
- chai_1.assert.lengthOf(args, 3);
194
- chai_1.assert.equal(foo1, 'foo=bar');
195
- chai_1.assert.equal(foo2, 'foo=baz,qux');
196
- chai_1.assert.equal(loadExtension, `load-extension=foo,quz,quux,${constants_1.PATH_TO_EXTENSION}`);
197
- });
198
- });
199
- });
200
- describe('and the user explicity sets the `--disable-extensions-except` flag', () => {
201
- it('does not modify the user provided args and appends the extension flags', () => {
202
- const args = (0, mergeChromeArgs_1.default)([
203
- 'foo=bar',
204
- 'baz=qux,quz',
205
- 'quux',
206
- 'disable-extensions-except=foo'
207
- ], {
208
- disableOtherExtensions: false
209
- });
210
- const [foo, baz, quux, disableExtensionsExcept, loadExtension] = args;
211
- chai_1.assert.lengthOf(args, 5);
212
- chai_1.assert.equal(foo, 'foo=bar');
213
- chai_1.assert.equal(baz, 'baz=qux,quz');
214
- chai_1.assert.equal(quux, 'quux');
215
- chai_1.assert.equal(disableExtensionsExcept, `disable-extensions-except=foo,${constants_1.PATH_TO_EXTENSION}`);
216
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
217
- });
218
- describe('and the user adds multiple instances of the same flag', () => {
219
- it('does not modify the user provided args and appends the extension flags', () => {
220
- const args = (0, mergeChromeArgs_1.default)([
221
- 'foo=bar',
222
- 'disable-extensions-except=baz',
223
- '--disable-extensions-except=qux'
224
- ], {
225
- disableOtherExtensions: false
226
- });
227
- const [foo, disableExtensionsExcept1, disableExtensionsExcept2, loadExtension] = args;
228
- chai_1.assert.lengthOf(args, 4);
229
- chai_1.assert.equal(foo, 'foo=bar');
230
- chai_1.assert.equal(disableExtensionsExcept1, 'disable-extensions-except=baz');
231
- chai_1.assert.equal(disableExtensionsExcept2, `--disable-extensions-except=qux,${constants_1.PATH_TO_EXTENSION}`);
232
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
233
- });
234
- describe('and some values are comma-separated', () => {
235
- it('does not modify the user provided args and appends the extension flags', () => {
236
- const args = (0, mergeChromeArgs_1.default)([
237
- 'foo=bar',
238
- 'foo=baz,qux',
239
- 'disable-extensions-except=foo,quz,quux'
240
- ], {
241
- disableOtherExtensions: false
242
- });
243
- const [foo1, foo2, disableExtensionsExcept, loadExtension] = args;
244
- chai_1.assert.lengthOf(args, 4);
245
- chai_1.assert.equal(foo1, 'foo=bar');
246
- chai_1.assert.equal(foo2, 'foo=baz,qux');
247
- chai_1.assert.equal(disableExtensionsExcept, `disable-extensions-except=foo,quz,quux,${constants_1.PATH_TO_EXTENSION}`);
248
- chai_1.assert.equal(loadExtension, `--load-extension=${constants_1.PATH_TO_EXTENSION}`);
249
- });
250
- });
251
- });
252
- });
253
- });
254
- });
255
- });
256
- });
257
- //# sourceMappingURL=mergeChromeArgs.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mergeChromeArgs.test.js","sourceRoot":"","sources":["../../src/utils/mergeChromeArgs.test.ts"],"names":[],"mappings":";;;;;AAAA,iBAAc;AACd,+BAA6B;AAC7B,2CAA+C;AAC/C,wEAA+C;AAE/C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;IAC/B,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;QACxD,QAAQ,CAAC,uCAAuC,EAAE,GAAG,EAAE;YACrD,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE;gBACjF,MAAM,IAAI,GAAG,IAAA,yBAAe,EAAC,EAAE,EAAE;oBAC/B,sBAAsB,EAAE,IAAI;iBAC7B,CAAC,CAAA;gBAEF,MAAM,CAAC,aAAa,EAAE,uBAAuB,CAAC,GAAG,IAAI,CAAA;gBAErD,aAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,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AI,EAAE,CAAC,CAAC,CAAA;gCACxB,aAAM,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAA;gCAC7B,aAAM,CAAC,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;gCACjC,aAAM,CAAC,KAAK,CACV,uBAAuB,EACvB,0CAA0C,6BAAiB,EAAE,CAC9D,CAAA;gCACD,aAAM,CAAC,KAAK,CACV,aAAa,EACb,oBAAoB,6BAAiB,EAAE,CACxC,CAAA;4BACH,CAAC,CAAC,CAAA;wBACJ,CAAC,CAAC,CAAA;oBACJ,CAAC,CAAC,CAAA;gBACJ,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- import 'mocha';
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("mocha");
4
- const chai_1 = require("chai");
5
- const proxyHandlers_1 = require("./proxyHandlers");
6
- describe('proxiedGetWithoutAnalyze', () => {
7
- it('should ensure proxied function names match originals', () => {
8
- class Original {
9
- constructor() {
10
- this.arrowFn = () => 'hello';
11
- }
12
- method() {
13
- return 'world';
14
- }
15
- }
16
- const original = new Original();
17
- const proxied = new Proxy(original, {
18
- get(target, prop) {
19
- return (0, proxyHandlers_1.proxiedGetWithoutAnalyze)(target, prop);
20
- }
21
- });
22
- chai_1.assert.equal(proxied.arrowFn.name, original.arrowFn.name);
23
- chai_1.assert.equal(proxied.method.name, original.method.name);
24
- chai_1.assert.equal(proxied.constructor.name, original.constructor.name);
25
- });
26
- });
27
- //# sourceMappingURL=proxyHandlers.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proxyHandlers.test.js","sourceRoot":"","sources":["../../src/utils/proxyHandlers.test.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,+BAA6B;AAC7B,mDAA0D;AAG1D,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,QAAQ;YAAd;gBACE,YAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAA;YAIzB,CAAC;YAHC,MAAM;gBACJ,OAAO,OAAO,CAAA;YAChB,CAAC;SACF;QACD,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA;QAC/B,MAAM,OAAO,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE;YAClC,GAAG,CAAC,MAAM,EAAE,IAAoB;gBAC9B,OAAO,IAAA,wCAAwB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;YAC/C,CAAC;SACF,CAAC,CAAA;QACF,aAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACzD,aAAM,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QACvD,aAAM,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IACnE,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- import 'mocha';
@@ -1,97 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("mocha");
4
- const chai_1 = require("chai");
5
- const validateAxeRunContext_1 = require("./validateAxeRunContext");
6
- describe('validateAxeRunContext', () => {
7
- describe('when no run context is provided', () => {
8
- it('does not throw an error', () => {
9
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)());
10
- });
11
- });
12
- describe('given a valid run context', () => {
13
- describe('when the run context is a string', () => {
14
- it('does not throw an error', () => {
15
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ include: 'selector' }));
16
- });
17
- });
18
- describe('when the run context is an array of strings', () => {
19
- it('does not throw an error', () => {
20
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ include: ['selector1', 'selector2'] }));
21
- });
22
- });
23
- describe('when the run context is an object', () => {
24
- describe('when the object has an `include` property', () => {
25
- it('does not throw an error', () => {
26
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ include: 'selector' }));
27
- });
28
- describe('and a `fromFrames` property', () => {
29
- it('does not throw an error', () => {
30
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({
31
- include: {
32
- fromFrames: ['selector', 'selector']
33
- }
34
- }));
35
- });
36
- });
37
- describe('and a `fromShadowDom` property', () => {
38
- it('does not throw an error', () => {
39
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({
40
- include: {
41
- fromShadowDom: ['selector', 'selector']
42
- }
43
- }));
44
- });
45
- });
46
- });
47
- describe('when the object has an `exclude` property', () => {
48
- it('does not throw an error', () => {
49
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ exclude: 'selector' }));
50
- });
51
- describe('and a `fromFrames` property', () => {
52
- it('does not throw an error', () => {
53
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({
54
- exclude: {
55
- fromFrames: ['selector', 'selector']
56
- }
57
- }));
58
- });
59
- });
60
- describe('and a `fromShadowDom` property', () => {
61
- it('does not throw an error', () => {
62
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({
63
- exclude: {
64
- fromShadowDom: ['selector', 'selector']
65
- }
66
- }));
67
- });
68
- });
69
- });
70
- describe('when the object has both `include` and `exclude` properties', () => {
71
- it('does not throw an error', () => {
72
- chai_1.assert.doesNotThrow(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ include: 'selector', exclude: 'selector' }));
73
- });
74
- });
75
- });
76
- });
77
- describe('given an invalid run context', () => {
78
- describe('and does not have an `include` or `exclude` property', () => {
79
- describe('and is not a string', () => {
80
- it('throws an error', () => {
81
- chai_1.assert.throws(() => (0, validateAxeRunContext_1.validateAxeRunContext)(1));
82
- });
83
- });
84
- describe('and is not an array of strings', () => {
85
- it('throws an error', () => {
86
- chai_1.assert.throws(() => (0, validateAxeRunContext_1.validateAxeRunContext)([1, 2]));
87
- });
88
- });
89
- describe('and does not have a `fromFrames` or `fromShadowDom` property', () => {
90
- it('throws an error', () => {
91
- chai_1.assert.throws(() => (0, validateAxeRunContext_1.validateAxeRunContext)({ a: 'a' }));
92
- });
93
- });
94
- });
95
- });
96
- });
97
- //# sourceMappingURL=validateAxeRunContext.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validateAxeRunContext.test.js","sourceRoot":"","sources":["../../src/utils/validateAxeRunContext.test.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,+BAA6B;AAC7B,mEAA+D;AAE/D,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;QAC/C,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;YACjC,aAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAA,6CAAqB,GAAE,CAAC,CAAA;QACpD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACzC,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;YAChD,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;gBACjC,aAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CACvB,IAAA,6CAAqB,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAC/C,CAAA;YACH,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;QAEF,QAAQ,CAAC,6CAA6C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,EAAE,GAAG,EAAE;YACpE,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;gBACnC,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;oBAEzB,aAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,6CAAqB,EAAC,CAAC,CAAC,CAAC,CAAA;gBAC/C,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;gBAC9C,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;oBAEzB,aAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,6CAAqB,EAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;gBACpD,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;YAEF,QAAQ,CAAC,8DAA8D,EAAE,GAAG,EAAE;gBAC5E,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;oBAEzB,aAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,6CAAqB,EAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAA;gBACxD,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- import 'mocha';
@@ -1,215 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- require("mocha");
4
- const chai_1 = require("chai");
5
- const validateAxeRunOptions_1 = require("./validateAxeRunOptions");
6
- describe('validateAxeRunOptions', () => {
7
- describe('given no options', () => {
8
- it('does not throw', () => {
9
- chai_1.assert.doesNotThrow(() => {
10
- (0, validateAxeRunOptions_1.validateAxeRunOptions)();
11
- });
12
- });
13
- });
14
- describe('given an option that has not been exposed to be configured', () => {
15
- it('throws', () => {
16
- chai_1.assert.throws(() => {
17
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ a: 'a' });
18
- }, /Invalid property found in `runOptions`/i);
19
- });
20
- });
21
- describe('given `ancestry` property is provided', () => {
22
- describe('when `ancestry` is not a boolean', () => {
23
- it('throws', () => {
24
- chai_1.assert.throws(() => {
25
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ ancestry: 'a' });
26
- }, /`ancestry` property must be a boolean./i);
27
- });
28
- });
29
- describe('when `ancestry` is a boolean', () => {
30
- it('does not throw', () => {
31
- chai_1.assert.doesNotThrow(() => {
32
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ ancestry: true });
33
- });
34
- });
35
- });
36
- });
37
- describe('given `rules` property is provided', () => {
38
- describe('when `rules` is not an object', () => {
39
- it('throws', () => {
40
- chai_1.assert.throws(() => {
41
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: 'a' });
42
- }, /`rules` property must be an object./i);
43
- });
44
- });
45
- describe('when `rules` is an array', () => {
46
- it('throws', () => {
47
- chai_1.assert.throws(() => {
48
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: ['a'] });
49
- }, /`rules` property must be an object./i);
50
- });
51
- });
52
- describe('when `rules` is an object', () => {
53
- describe('when `rules` object has no value', () => {
54
- it('throws', () => {
55
- chai_1.assert.throws(() => {
56
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: {} });
57
- }, /`rules` object must contain at least one key-value pair./i);
58
- });
59
- });
60
- describe('when `rules` object has a value', () => {
61
- describe('and the value is not an object', () => {
62
- it('throws', () => {
63
- chai_1.assert.throws(() => {
64
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: 'a' } });
65
- }, /The value of the `a` key in the `rules` object must be an object./i);
66
- });
67
- });
68
- describe('and the value is an object', () => {
69
- describe('and the value has no properties', () => {
70
- it('throws', () => {
71
- chai_1.assert.throws(() => {
72
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: {} } });
73
- }, /The `a` key in the `rules` object must only contain the `enabled` property./i);
74
- });
75
- });
76
- describe('and the value has properties', () => {
77
- describe('and the value does not have an `enabled` property', () => {
78
- it('throws', () => {
79
- chai_1.assert.throws(() => {
80
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: { b: 'a' } } });
81
- }, /The `a` key in the `rules` object must contain an `enabled` property./i);
82
- });
83
- });
84
- describe('and the value has an `enabled` property', () => {
85
- describe('and the `enabled` property is not a boolean', () => {
86
- it('throws', () => {
87
- chai_1.assert.throws(() => {
88
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: { enabled: 'a' } } });
89
- }, /The `enabled` property of the `a` key in the `rules` object must be a boolean./i);
90
- });
91
- });
92
- describe('and the `enabled` property is a boolean', () => {
93
- it('does not throw', () => {
94
- chai_1.assert.doesNotThrow(() => {
95
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ rules: { a: { enabled: true } } });
96
- });
97
- });
98
- });
99
- });
100
- });
101
- });
102
- });
103
- });
104
- });
105
- describe('given `runOnly` property is provided', () => {
106
- describe('when `runOnly` is a string', () => {
107
- it('does not throw', () => {
108
- chai_1.assert.doesNotThrow(() => {
109
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: 'a' });
110
- });
111
- });
112
- });
113
- describe('when `runOnly` is an array', () => {
114
- describe('and the array is empty', () => {
115
- it('throws', () => {
116
- chai_1.assert.throws(() => {
117
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: [] });
118
- }, /`runOnly` array must contain at least one string value./i);
119
- });
120
- });
121
- describe('and the array is not empty', () => {
122
- describe('and the array is not an array of strings', () => {
123
- it('throws', () => {
124
- chai_1.assert.throws(() => {
125
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: ['a', 1] });
126
- }, /`runOnly` array must contain only strings./i);
127
- });
128
- });
129
- describe('and the array is an array of strings', () => {
130
- it('does not throw', () => {
131
- chai_1.assert.doesNotThrow(() => {
132
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: ['a, b'] });
133
- });
134
- });
135
- });
136
- });
137
- });
138
- describe('when `runOnly` is not a string, array or object', () => {
139
- it('throws', () => {
140
- chai_1.assert.throws(() => {
141
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: 1 });
142
- }, /`runOnly` property must be an object, an array, or a string./i);
143
- });
144
- });
145
- describe('when `runOnly` is an object', () => {
146
- describe('and the object has no `type` property', () => {
147
- it('throws', () => {
148
- chai_1.assert.throws(() => {
149
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: {} });
150
- }, /`runOnly` object must contain a `type` property./i);
151
- });
152
- });
153
- describe('and the object has no `values` property', () => {
154
- it('throws', () => {
155
- chai_1.assert.throws(() => {
156
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'rule' } });
157
- }, /`runOnly` object must contain a `values` property./i);
158
- });
159
- });
160
- describe('and the object has an invalid `type` property', () => {
161
- it('throws', () => {
162
- chai_1.assert.throws(() => {
163
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'a', values: ['a'] } });
164
- }, /`runOnly` object's `type` property must be one of the following:/i);
165
- });
166
- });
167
- describe('and the object has a valid `type` property', () => {
168
- describe('and the `values` property is not an array', () => {
169
- it('throws', () => {
170
- chai_1.assert.throws(() => {
171
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'rule', values: 'a' } });
172
- }, /`runOnly` object's `values` property must be an array./i);
173
- });
174
- });
175
- describe('and the `values` property is an empty array', () => {
176
- it('throws', () => {
177
- chai_1.assert.throws(() => {
178
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({ runOnly: { type: 'rule', values: [] } });
179
- }, /`runOnly` object's `values` property must contain at least one value./i);
180
- });
181
- });
182
- describe('and the `values` property is an array of non-strings', () => {
183
- it('throws', () => {
184
- chai_1.assert.throws(() => {
185
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({
186
- runOnly: { type: 'rule', values: ['a', 1] }
187
- });
188
- }, /`runOnly` object's `values` property must contain only strings./i);
189
- });
190
- });
191
- describe('and the `values` property is an array of strings', () => {
192
- it('does not throw', () => {
193
- chai_1.assert.doesNotThrow(() => {
194
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({
195
- runOnly: { type: 'rule', values: ['a', 'b'] }
196
- });
197
- });
198
- });
199
- });
200
- });
201
- });
202
- });
203
- describe('given a valid `runOnly` object', () => {
204
- it('does not throw', () => {
205
- chai_1.assert.doesNotThrow(() => {
206
- (0, validateAxeRunOptions_1.validateAxeRunOptions)({
207
- runOnly: { type: 'rule', values: ['ruleId1'] },
208
- ancestry: true,
209
- rules: { a: { enabled: true } }
210
- });
211
- });
212
- });
213
- });
214
- });
215
- //# sourceMappingURL=validateAxeRunOptions.test.js.map