@axe-core/watcher 3.16.0 → 3.16.1-next.6c2c189f
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSES-3RD-PARTY.md +720 -0
- package/dist/Controller.d.ts +1 -1
- package/dist/Controller.js +42 -34
- package/dist/Controller.js.map +1 -1
- package/dist/cypress.d.ts +2 -0
- package/dist/cypress.js +11 -5
- package/dist/cypress.js.map +1 -1
- package/dist/cypressCommands.js +65 -40
- package/dist/cypressCommands.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/playwright.d.ts +1 -1
- package/dist/playwright.js +6 -1
- package/dist/playwright.js.map +1 -1
- package/dist/playwrightTest.d.ts +9 -3
- package/dist/playwrightTest.js +10 -5
- package/dist/playwrightTest.js.map +1 -1
- package/dist/playwrightWrapping.d.ts +1 -0
- package/dist/playwrightWrapping.js +15 -7
- package/dist/playwrightWrapping.js.map +1 -1
- package/dist/puppeteer.js +4 -0
- package/dist/puppeteer.js.map +1 -1
- package/dist/sendResultsToServer.d.ts +2 -1
- package/dist/sendResultsToServer.js.map +1 -1
- package/dist/utils/assertVariablesWereWritten.d.ts +1 -0
- package/dist/utils/assertVariablesWereWritten.js +15 -0
- package/dist/utils/assertVariablesWereWritten.js.map +1 -0
- package/dist/utils/checkUserArgs.d.ts +8 -0
- package/dist/utils/checkUserArgs.js +10 -0
- package/dist/utils/checkUserArgs.js.map +1 -0
- package/dist/utils/proxyHandlers.d.ts +2 -0
- package/dist/utils/proxyHandlers.js +14 -1
- package/dist/utils/proxyHandlers.js.map +1 -1
- package/dist/utils/runOptions.d.ts +16 -0
- package/dist/utils/runOptions.js +3 -0
- package/dist/utils/runOptions.js.map +1 -0
- package/dist/utils/validateAxeRunOptions.d.ts +1 -1
- package/dist/wdio.js +5 -0
- package/dist/wdio.js.map +1 -1
- package/dist/webdriver.js +4 -0
- package/dist/webdriver.js.map +1 -1
- package/extension/axe.js +1 -1
- package/extension/axe.js.LICENSE.txt +1 -1
- package/extension/background.js +1 -1
- package/extension/content.js +1 -1
- package/package.json +8 -7
- package/dist/utils/headlessNotSupportedError.test.d.ts +0 -1
- package/dist/utils/headlessNotSupportedError.test.js +0 -21
- package/dist/utils/headlessNotSupportedError.test.js.map +0 -1
- package/dist/utils/initializeSession.test.d.ts +0 -1
- package/dist/utils/initializeSession.test.js +0 -177
- package/dist/utils/initializeSession.test.js.map +0 -1
- package/dist/utils/isValidExcludePattern.test.d.ts +0 -1
- package/dist/utils/isValidExcludePattern.test.js +0 -17
- package/dist/utils/isValidExcludePattern.test.js.map +0 -1
- package/dist/utils/mergeChromeArgs.test.d.ts +0 -1
- package/dist/utils/mergeChromeArgs.test.js +0 -257
- package/dist/utils/mergeChromeArgs.test.js.map +0 -1
- package/dist/utils/proxyHandlers.test.d.ts +0 -1
- package/dist/utils/proxyHandlers.test.js +0 -27
- package/dist/utils/proxyHandlers.test.js.map +0 -1
- package/dist/utils/validateAxeRunContext.test.d.ts +0 -1
- package/dist/utils/validateAxeRunContext.test.js +0 -97
- package/dist/utils/validateAxeRunContext.test.js.map +0 -1
- package/dist/utils/validateAxeRunOptions.test.d.ts +0 -1
- package/dist/utils/validateAxeRunOptions.test.js +0 -215
- package/dist/utils/validateAxeRunOptions.test.js.map +0 -1
- package/dist/utils/writeVariables.test.d.ts +0 -1
- package/dist/utils/writeVariables.test.js +0 -200
- package/dist/utils/writeVariables.test.js.map +0 -1
package/package.json
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "@axe-core/watcher",
|
3
|
-
"version": "3.16.
|
3
|
+
"version": "3.16.1-next.6c2c189f",
|
4
4
|
"description": "",
|
5
5
|
"license": "UNLICENSED",
|
6
6
|
"main": "dist/index.js",
|
7
7
|
"files": [
|
8
8
|
"dist",
|
9
|
-
"extension"
|
9
|
+
"extension",
|
10
|
+
"LICENSES-3RD-PARTY.md"
|
10
11
|
],
|
11
12
|
"scripts": {
|
12
13
|
"build": "tsc --removeComments && tsc --declaration --emitDeclarationOnly",
|
@@ -25,7 +26,7 @@
|
|
25
26
|
"uuid": "^10.0.0"
|
26
27
|
},
|
27
28
|
"devDependencies": {
|
28
|
-
"@deque/advanced-rule-recorder": "^1.
|
29
|
+
"@deque/advanced-rule-recorder": "^1.25.0-next.44cf60d4",
|
29
30
|
"@playwright/test": "^1.45.0",
|
30
31
|
"@types/body-parser": "^1.19.2",
|
31
32
|
"@types/chai": "^4.3.3",
|
@@ -41,7 +42,7 @@
|
|
41
42
|
"@types/sinon": "^17.0.3",
|
42
43
|
"@types/uuid": "^10.0.0",
|
43
44
|
"@wdio/types": "^9.0.4",
|
44
|
-
"axe-core": "^4.10.
|
45
|
+
"axe-core": "^4.10.2",
|
45
46
|
"axe-test-fixtures": "github:dequelabs/axe-test-fixtures#v1",
|
46
47
|
"body-parser": "^1.20.1",
|
47
48
|
"chai": "^4.3.6",
|
@@ -49,7 +50,7 @@
|
|
49
50
|
"cypress": "^13.6.6",
|
50
51
|
"execa": "5",
|
51
52
|
"express": "^4.18.2",
|
52
|
-
"jsdom": "^
|
53
|
+
"jsdom": "^25.0.1",
|
53
54
|
"mocha": "^10.4.0",
|
54
55
|
"morgan": "^1.10.0",
|
55
56
|
"nock": "^13.3.2",
|
@@ -59,10 +60,10 @@
|
|
59
60
|
"puppeteer": "^22.1.0",
|
60
61
|
"rimraf": "^5.0.5",
|
61
62
|
"selenium-webdriver": "^4.11.1",
|
62
|
-
"sinon": "^
|
63
|
+
"sinon": "^19.0.2",
|
63
64
|
"tempy": "1",
|
64
65
|
"ts-node": "^10.9.1",
|
65
66
|
"typescript": "^5.1.6",
|
66
67
|
"webdriverio": "^9.0.5"
|
67
68
|
}
|
68
|
-
}
|
69
|
+
}
|
@@ -1 +0,0 @@
|
|
1
|
-
import 'mocha';
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
require("mocha");
|
4
|
-
const chai_1 = require("chai");
|
5
|
-
const headlessNotSupportedError_1 = require("./headlessNotSupportedError");
|
6
|
-
describe('headlessNotSupportedError', () => {
|
7
|
-
describe('given no `extendedMessage`', () => {
|
8
|
-
it('should return the default message', () => {
|
9
|
-
const error = new headlessNotSupportedError_1.HeadlessNotSupportedError();
|
10
|
-
chai_1.assert.equal(error.message, (0, headlessNotSupportedError_1.generateMessage)());
|
11
|
-
});
|
12
|
-
});
|
13
|
-
describe('given an `extendedMessage`', () => {
|
14
|
-
it('should return the default message with the `extendedMessage` appended', () => {
|
15
|
-
const extendedMessage = 'extended message';
|
16
|
-
const error = new headlessNotSupportedError_1.HeadlessNotSupportedError(extendedMessage);
|
17
|
-
chai_1.assert.equal(error.message, (0, headlessNotSupportedError_1.generateMessage)(extendedMessage));
|
18
|
-
});
|
19
|
-
});
|
20
|
-
});
|
21
|
-
//# sourceMappingURL=headlessNotSupportedError.test.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"headlessNotSupportedError.test.js","sourceRoot":"","sources":["../../src/utils/headlessNotSupportedError.test.ts"],"names":[],"mappings":";;AAAA,iBAAc;AACd,+BAA6B;AAC7B,2EAGoC;AAEpC,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QAC1C,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE;YAC3C,MAAM,KAAK,GAAG,IAAI,qDAAyB,EAAE,CAAA;YAE7C,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAA,2CAAe,GAAE,CAAC,CAAA;QAChD,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,QAAQ,CAAC,4BAA4B,EAAE,GAAG,EAAE;QAC1C,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE;YAC/E,MAAM,eAAe,GAAG,kBAAkB,CAAA;YAC1C,MAAM,KAAK,GAAG,IAAI,qDAAyB,CAAC,eAAe,CAAC,CAAA;YAE5D,aAAM,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,IAAA,2CAAe,EAAC,eAAe,CAAC,CAAC,CAAA;QAC/D,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
import 'mocha';
|
@@ -1,177 +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 sinon_1 = __importDefault(require("sinon"));
|
9
|
-
const proxyquire_1 = __importDefault(require("proxyquire"));
|
10
|
-
const initializeSession_1 = __importDefault(require("./initializeSession"));
|
11
|
-
describe('initializeSession', () => {
|
12
|
-
afterEach(sinon_1.default.restore);
|
13
|
-
const defaultParams = {
|
14
|
-
apiKey: 'abc',
|
15
|
-
serverURL: 'http://localhost:3000',
|
16
|
-
watcherVersion: '1.0.0',
|
17
|
-
sessionID: null,
|
18
|
-
buildID: null,
|
19
|
-
gitCommitSha: null
|
20
|
-
};
|
21
|
-
describe('validating input', () => {
|
22
|
-
describe('when the API key is missing', () => {
|
23
|
-
it('throws an error', () => {
|
24
|
-
chai_1.assert.throws(() => {
|
25
|
-
(0, initializeSession_1.default)({});
|
26
|
-
}, 'API key is required');
|
27
|
-
});
|
28
|
-
});
|
29
|
-
describe('when the server URL is missing', () => {
|
30
|
-
it('throws an error', () => {
|
31
|
-
chai_1.assert.throws(() => {
|
32
|
-
(0, initializeSession_1.default)({ apiKey: 'abc' });
|
33
|
-
}, 'Server URL is required');
|
34
|
-
});
|
35
|
-
});
|
36
|
-
describe('when the watcher version is missing', () => {
|
37
|
-
it('throws an error', () => {
|
38
|
-
chai_1.assert.throws(() => {
|
39
|
-
(0, initializeSession_1.default)({
|
40
|
-
apiKey: 'abc',
|
41
|
-
serverURL: 'http://localhost:3000'
|
42
|
-
});
|
43
|
-
}, 'Watcher version is required');
|
44
|
-
});
|
45
|
-
});
|
46
|
-
describe('when the session ID is not a string', () => {
|
47
|
-
it('throws an error', () => {
|
48
|
-
chai_1.assert.throws(() => {
|
49
|
-
(0, initializeSession_1.default)({
|
50
|
-
...defaultParams,
|
51
|
-
sessionID: 123
|
52
|
-
});
|
53
|
-
}, 'Session ID must be a string');
|
54
|
-
});
|
55
|
-
});
|
56
|
-
describe('when the build ID is not a string', () => {
|
57
|
-
it('throws an error', () => {
|
58
|
-
chai_1.assert.throws(() => {
|
59
|
-
(0, initializeSession_1.default)({
|
60
|
-
...defaultParams,
|
61
|
-
buildID: 123
|
62
|
-
});
|
63
|
-
}, 'Build ID must be a string');
|
64
|
-
});
|
65
|
-
});
|
66
|
-
describe('when both session ID and build ID are provided', () => {
|
67
|
-
it('throws an error', () => {
|
68
|
-
chai_1.assert.throws(() => {
|
69
|
-
(0, initializeSession_1.default)({
|
70
|
-
...defaultParams,
|
71
|
-
sessionID: 'abc',
|
72
|
-
buildID: '123'
|
73
|
-
});
|
74
|
-
}, 'Session ID and Build ID are mutually exclusive. `sessionId` is deprecated, please use `buildID` instead');
|
75
|
-
});
|
76
|
-
});
|
77
|
-
describe('when the git commit SHA is not a string', () => {
|
78
|
-
it('throws an error', () => {
|
79
|
-
chai_1.assert.throws(() => {
|
80
|
-
(0, initializeSession_1.default)({
|
81
|
-
...defaultParams,
|
82
|
-
gitCommitSha: 123
|
83
|
-
});
|
84
|
-
}, 'Git commit SHA must be a string');
|
85
|
-
});
|
86
|
-
});
|
87
|
-
});
|
88
|
-
describe('when the server returns a non-200 response', () => {
|
89
|
-
afterEach(sinon_1.default.restore);
|
90
|
-
it('throws an error', () => {
|
91
|
-
const requestStub = sinon_1.default
|
92
|
-
.stub()
|
93
|
-
.returns({ statusCode: 500, getBody: () => '{"errors":["boom"]}' });
|
94
|
-
const fn = (0, proxyquire_1.default)('./initializeSession', {
|
95
|
-
'sync-request': requestStub
|
96
|
-
}).default;
|
97
|
-
chai_1.assert.throws(() => {
|
98
|
-
fn(defaultParams);
|
99
|
-
}, 'boom');
|
100
|
-
});
|
101
|
-
});
|
102
|
-
describe('when the server returns a 200 response', () => {
|
103
|
-
it('does not throw an error', () => {
|
104
|
-
const expectedBody = {
|
105
|
-
errors: [],
|
106
|
-
warnings: [],
|
107
|
-
session_id: 'abc'
|
108
|
-
};
|
109
|
-
const requestStub = sinon_1.default.stub().returns({
|
110
|
-
statusCode: 200,
|
111
|
-
getBody: () => JSON.stringify(expectedBody)
|
112
|
-
});
|
113
|
-
const fn = (0, proxyquire_1.default)('./initializeSession', {
|
114
|
-
'sync-request': requestStub
|
115
|
-
}).default;
|
116
|
-
const invoke = fn(defaultParams);
|
117
|
-
chai_1.assert.doesNotThrow(() => invoke);
|
118
|
-
chai_1.assert.deepEqual(invoke, expectedBody.session_id);
|
119
|
-
});
|
120
|
-
describe('and no session_id is returned', () => {
|
121
|
-
const expectedBody = {
|
122
|
-
errors: [],
|
123
|
-
warnings: []
|
124
|
-
};
|
125
|
-
const sessionID = 'xyz';
|
126
|
-
describe('and a sessionID is provided', () => {
|
127
|
-
it('uses the sessionID', () => {
|
128
|
-
const requestStub = sinon_1.default.stub().returns({
|
129
|
-
statusCode: 200,
|
130
|
-
getBody: () => JSON.stringify(expectedBody)
|
131
|
-
});
|
132
|
-
const fn = (0, proxyquire_1.default)('./initializeSession', {
|
133
|
-
'sync-request': requestStub
|
134
|
-
}).default;
|
135
|
-
const invoke = fn({
|
136
|
-
...defaultParams,
|
137
|
-
...{ sessionID }
|
138
|
-
});
|
139
|
-
chai_1.assert.deepEqual(invoke, sessionID);
|
140
|
-
});
|
141
|
-
});
|
142
|
-
describe('and a buildID is provided', () => {
|
143
|
-
it('throws', () => {
|
144
|
-
const requestStub = sinon_1.default.stub().returns({
|
145
|
-
statusCode: 200,
|
146
|
-
getBody: () => JSON.stringify(expectedBody)
|
147
|
-
});
|
148
|
-
const fn = (0, proxyquire_1.default)('./initializeSession', {
|
149
|
-
'sync-request': requestStub
|
150
|
-
}).default;
|
151
|
-
const buildID = 'def';
|
152
|
-
chai_1.assert.throws(() => fn({
|
153
|
-
...defaultParams,
|
154
|
-
...{ buildID }
|
155
|
-
}), 'Failed to initialize session based on build_id. Try again later.');
|
156
|
-
});
|
157
|
-
});
|
158
|
-
describe('and neither a sessionID nor a buildID are provided', () => {
|
159
|
-
it('uses a generated UUID', () => {
|
160
|
-
const requestStub = sinon_1.default.stub().returns({
|
161
|
-
statusCode: 200,
|
162
|
-
getBody: () => JSON.stringify(expectedBody)
|
163
|
-
});
|
164
|
-
const generatedID = 'ghi';
|
165
|
-
const uuidStub = sinon_1.default.stub().returns(generatedID);
|
166
|
-
const fn = (0, proxyquire_1.default)('./initializeSession', {
|
167
|
-
'sync-request': requestStub,
|
168
|
-
uuid: { v4: uuidStub }
|
169
|
-
}).default;
|
170
|
-
const invoke = fn(defaultParams);
|
171
|
-
chai_1.assert.deepEqual(invoke, generatedID);
|
172
|
-
});
|
173
|
-
});
|
174
|
-
});
|
175
|
-
});
|
176
|
-
});
|
177
|
-
//# sourceMappingURL=initializeSession.test.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"initializeSession.test.js","sourceRoot":"","sources":["../../src/utils/initializeSession.test.ts"],"names":[],"mappings":";;;;;AAAA,iBAAc;AACd,+BAA6B;AAC7B,kDAAyB;AACzB,4DAAmC;AACnC,4EAE4B;AAE5B,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,SAAS,CAAC,eAAK,CAAC,OAAO,CAAC,CAAA;IAExB,MAAM,aAAa,GAA4B;QAC7C,MAAM,EAAE,KAAK;QACb,SAAS,EAAE,uBAAuB;QAClC,cAAc,EAAE,OAAO;QACvB,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI;QACb,YAAY,EAAE,IAAI;KACnB,CAAA;IAED,QAAQ,CAAC,kBAAk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CAAC,oDAAoD,EAAE,GAAG,EAAE;gBAClE,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;oBAC/B,MAAM,WAAW,GAAG,eAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC;wBACvC,UAAU,EAAE,GAAG;wBACf,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;qBAC5C,CAAC,CAAA;oBACF,MAAM,WAAW,GAAG,KAAK,CAAA;oBACzB,MAAM,QAAQ,GAAG,eAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;oBAClD,MAAM,EAAE,GAAG,IAAA,oBAAU,EAAC,qBAAqB,EAAE;wBAC3C,cAAc,EAAE,WAAW;wBAC3B,IAAI,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE;qBACvB,CAAC,CAAC,OAAmC,CAAA;oBAEtC,MAAM,MAAM,GAAG,EAAE,CAAC,aAAa,CAAC,CAAA;oBAEhC,aAAM,CAAC,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC,CAAA;gBACvC,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,17 +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 isValidExcludePattern_1 = __importDefault(require("./isValidExcludePattern"));
|
9
|
-
describe('isValidExcludePattern', () => {
|
10
|
-
it('returns true for valid exclude patterns', () => {
|
11
|
-
chai_1.assert.doesNotThrow(() => (0, isValidExcludePattern_1.default)(['foo', 'bar']));
|
12
|
-
});
|
13
|
-
it('returns false for invalid exclude patterns', () => {
|
14
|
-
chai_1.assert.throws(() => (0, isValidExcludePattern_1.default)(['foo', 'bar', 1]));
|
15
|
-
});
|
16
|
-
});
|
17
|
-
//# sourceMappingURL=isValidExcludePattern.test.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"isValidExcludePattern.test.js","sourceRoot":"","sources":["../../src/utils/isValidExcludePattern.test.ts"],"names":[],"mappings":";;;;;AAAA,iBAAc;AACd,+BAA6B;AAC7B,oFAA2D;AAE3D,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACrC,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACjD,aAAM,CAAC,YAAY,CAAC,GAAG,EAAE,CAAC,IAAA,+BAAqB,EAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;IAClE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,aAAM,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,+BAAqB,EAAC,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/D,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
@@ -1 +0,0 @@
|
|
1
|
-
import 'mocha';
|
@@ -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,+BA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AK,CACV,aAAa,EACb,oBAAoB,6BAAiB,EAAE,CACxC,CAAA;wBACH,CAAC,CAAC,CAAA;wBAEF,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;4BACnD,EAAE,CAAC,wEAAwE,EAAE,GAAG,EAAE;gCAChF,MAAM,IAAI,GAAG,IAAA,yBAAe,EAC1B;oCACE,SAAS;oCACT,aAAa;oCACb,wCAAwC;iCACzC,EACD;oCACE,sBAAsB,EAAE,KAAK;iCAC9B,CACF,CAAA;gCAED,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,aAAa,CAAC,GACxD,IAAI,CAAA;gCAEN,aAAM,CAAC,QAAQ,CAAC,IAAI,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';
|