@axe-core/watcher 3.18.0-next.c34d14e3 → 3.18.0-next.c4a2131c
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.
@@ -11,16 +11,16 @@ function validateHeadlessPlaywright({ isPlaywrightTest, playwrightConfig }) {
|
|
11
11
|
if (playwrightConfig.headless) {
|
12
12
|
throw new headlessNotSupportedError_1.HeadlessNotSupportedError(preHeadlessChangeMessage());
|
13
13
|
}
|
14
|
+
validatePlaywrightChannel(playwrightConfig.channel);
|
14
15
|
return;
|
15
16
|
}
|
16
17
|
if (playwrightConfig.headless === undefined) {
|
17
18
|
throw new newHeadlessPlaywrightNotSupportedError_1.HeadlessPlaywrightNotSupportedError('@axe-core/watcher is not supported in chromium-headless-shell mode.');
|
18
19
|
}
|
19
|
-
|
20
|
-
const isChromeChannel = playwrightConfig.channel === 'chrome';
|
21
|
-
if (playwrightConfig.headless && !(isChromiumChannel || isChromeChannel)) {
|
20
|
+
if (playwrightConfig.headless && !playwrightConfig.channel) {
|
22
21
|
throw new newHeadlessPlaywrightNotSupportedError_1.HeadlessPlaywrightNotSupportedError('@axe-core/watcher requires either fully headed mode or new headless mode.');
|
23
22
|
}
|
23
|
+
validatePlaywrightChannel(playwrightConfig.channel);
|
24
24
|
}
|
25
25
|
catch (error) {
|
26
26
|
if (error instanceof headlessNotSupportedError_1.HeadlessNotSupportedError ||
|
@@ -32,5 +32,11 @@ function validateHeadlessPlaywright({ isPlaywrightTest, playwrightConfig }) {
|
|
32
32
|
}
|
33
33
|
}
|
34
34
|
}
|
35
|
+
function validatePlaywrightChannel(channel) {
|
36
|
+
const SUPPORTED_CHANNELS = ['chromium', 'chrome'];
|
37
|
+
if (channel && !SUPPORTED_CHANNELS.includes(channel)) {
|
38
|
+
throw new newHeadlessPlaywrightNotSupportedError_1.HeadlessPlaywrightNotSupportedError('@axe-core/watcher requires either fully headed mode or new headless mode.');
|
39
|
+
}
|
40
|
+
}
|
35
41
|
exports.default = validateHeadlessPlaywright;
|
36
42
|
//# sourceMappingURL=validateHeadlessPlaywright.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validateHeadlessPlaywright.js","sourceRoot":"","sources":["../../src/utils/validateHeadlessPlaywright.ts"],"names":[],"mappings":";;AACA,2EAAuE;AACvE,qGAA8F;AAO9F,SAAS,0BAA0B,CAAC,EAClC,gBAAgB,EAChB,gBAAgB,EACiB;IACjC,MAAM,wBAAwB,GAAG,GAAW,EAAE,CAC5C,OAAO,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,YAAY,sGAAsG,CAAA;IAMnK,IAAI,CAAC;QACH,MAAM,qBAAqB,GAEzB,OAAO,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAA;QACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAGjE,CAAA;QAGD,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,EAAE,EAAE,CAAC;YAC/B,IAAI,gBAAgB,CAAC,QAAQ,EAAE,CAAC;gBAC9B,MAAM,IAAI,qDAAyB,CAAC,wBAAwB,EAAE,CAAC,CAAA;YACjE,CAAC;
|
1
|
+
{"version":3,"file":"validateHeadlessPlaywright.js","sourceRoot":"","sources":["../../src/utils/validateHeadlessPlaywright.ts"],"names":[],"mappings":";;AACA,2EAAuE;AACvE,qGAA8F;AAO9F,SAAS,0BAA0B,CAAC,EAClC,gBAAgB,EAChB,gBAAgB,EACiB;IACjC,MAAM,wBAAwB,GAAG,GAAW,EAAE,CAC5C,OAAO,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,YAAY,sGAAsG,CAAA;IAMnK,IAAI,CAAC;QACH,MAAM,qBAAqB,GAEzB,OAAO,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAA;QACjD,MAAM,CAAC,KAAK,EA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