@wdio/browser-runner 8.3.6 → 8.3.8
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/build/browser/driver.js +1 -1
- package/build/browser/frameworks/mocha.js +1 -1
- package/build/constants.js +1 -1
- package/build/vite/constants.d.ts.map +1 -1
- package/build/vite/constants.js +1 -4
- package/build/vite/plugins/testrunner.d.ts.map +1 -1
- package/build/vite/plugins/testrunner.js +9 -2
- package/build/vite/server.d.ts +1 -1
- package/build/vite/server.d.ts.map +1 -1
- package/build/vite/server.js +0 -1
- package/build/vite/utils.d.ts +1 -2
- package/build/vite/utils.d.ts.map +1 -1
- package/build/vite/utils.js +1 -6
- package/package.json +7 -7
package/build/browser/driver.js
CHANGED
|
@@ -114,7 +114,7 @@ export default class ProxyDriver {
|
|
|
114
114
|
for (const method of CONSOLE_METHODS) {
|
|
115
115
|
const origCommand = console[method].bind(console);
|
|
116
116
|
console[method] = (...args) => {
|
|
117
|
-
socket.send(stringify
|
|
117
|
+
socket.send(stringify(this.#consoleMessage({
|
|
118
118
|
name: 'consoleEvent',
|
|
119
119
|
type: method,
|
|
120
120
|
args,
|
|
@@ -80,7 +80,7 @@ export class MochaFramework {
|
|
|
80
80
|
return reject(new Error('"cid" query parameter is missing'));
|
|
81
81
|
}
|
|
82
82
|
this.#hookResolver.set(id.toString(), { resolve, reject });
|
|
83
|
-
this.#socket.send(stringify
|
|
83
|
+
this.#socket.send(stringify(this.#hookTrigger({ name, id, cid, args })));
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
#hookTrigger(value) {
|
package/build/constants.js
CHANGED
|
@@ -20,7 +20,7 @@ export var MESSAGE_TYPES;
|
|
|
20
20
|
MESSAGE_TYPES[MESSAGE_TYPES["commandResponseMessage"] = 2] = "commandResponseMessage";
|
|
21
21
|
MESSAGE_TYPES[MESSAGE_TYPES["hookTriggerMessage"] = 3] = "hookTriggerMessage";
|
|
22
22
|
MESSAGE_TYPES[MESSAGE_TYPES["hookResultMessage"] = 4] = "hookResultMessage";
|
|
23
|
-
})(MESSAGE_TYPES
|
|
23
|
+
})(MESSAGE_TYPES || (MESSAGE_TYPES = {}));
|
|
24
24
|
export const DEFAULT_INCLUDE = ['**'];
|
|
25
25
|
export const DEFAULT_FILE_EXTENSIONS = ['.js', '.cjs', '.mjs', '.ts', '.mts', '.cts', '.tsx', '.jsx', '.vue', '.svelte'];
|
|
26
26
|
export const DEFAULT_REPORTS_DIRECTORY = 'coverage';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAgB1F,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/vite/constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS,CAgB1F,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAAO,CAAC,YAAY,CAsBrD,CAAA"}
|
package/build/vite/constants.js
CHANGED
|
@@ -23,10 +23,7 @@ export const DEFAULT_VITE_CONFIG = {
|
|
|
23
23
|
logLevel: 'silent',
|
|
24
24
|
plugins: [topLevelAwait()],
|
|
25
25
|
build: {
|
|
26
|
-
sourcemap: 'inline'
|
|
27
|
-
commonjsOptions: {
|
|
28
|
-
include: [/node_modules/],
|
|
29
|
-
}
|
|
26
|
+
sourcemap: 'inline'
|
|
30
27
|
},
|
|
31
28
|
optimizeDeps: {
|
|
32
29
|
include: ['expect', 'jest-matcher-utils'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testrunner.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/testrunner.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"testrunner.d.ts","sourceRoot":"","sources":["../../../src/vite/plugins/testrunner.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA2ClC,wBAAgB,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,GAAG,MAAM,EAAE,CAgI9E"}
|
|
@@ -15,12 +15,19 @@ const protocolCommandList = Object.values(commands).map((endpoint) => Object.val
|
|
|
15
15
|
const WDIO_PACKAGES = ['webdriverio', 'expect-webdriverio'];
|
|
16
16
|
const virtualModuleId = 'virtual:wdio';
|
|
17
17
|
const resolvedVirtualModuleId = '\0' + virtualModuleId;
|
|
18
|
-
const MODULES_TO_MOCK = [
|
|
19
|
-
|
|
18
|
+
const MODULES_TO_MOCK = [
|
|
19
|
+
'import-meta-resolve', 'puppeteer-core', 'archiver', 'glob', 'devtools', 'ws'
|
|
20
|
+
];
|
|
20
21
|
const POLYFILLS = [
|
|
21
22
|
...builtinModules,
|
|
22
23
|
...builtinModules.map((m) => `node:${m}`)
|
|
23
24
|
].map((m) => m.replace('/promises', ''));
|
|
25
|
+
const FETCH_FROM_ESM = [
|
|
26
|
+
'serialize-error', 'minimatch', 'css-shorthand-properties', 'lodash.merge', 'lodash.zip',
|
|
27
|
+
'lodash.clonedeep', 'lodash.pickby', 'lodash.flattendeep', 'aria-query', 'grapheme-splitter',
|
|
28
|
+
'css-value', 'rgb2hex', 'p-iteration', 'fast-safe-stringify', 'deepmerge-ts',
|
|
29
|
+
'mocha'
|
|
30
|
+
];
|
|
24
31
|
export function testrunner(options) {
|
|
25
32
|
const automationProtocolPath = `/@fs${url.pathToFileURL(path.resolve(__dirname, '..', '..', 'browser', 'driver.js')).pathname}`;
|
|
26
33
|
const mockModulePath = path.resolve(__dirname, '..', '..', 'browser', 'mock.js');
|
package/build/vite/server.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/vite/server.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM1C,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAGpC,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,MAAM,CAAA;AAGvD,OAAO,KAAK,EAAY,OAAO,EAAE,MAAM,aAAa,CAAA;AAMpD,OAAO,KAAK,EAAgB,gBAAgB,EAA6E,MAAM,YAAY,CAAA;AAY3I,qBAAa,UAAW,SAAQ,YAAY;;IAQxC,IAAI,YAAY,gCAEf;IAED,IAAI,MAAM,0BAET;gBAEY,OAAO,EAAE,WAAW,CAAC,oBAAoB,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/vite/server.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAM1C,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAGpC,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,MAAM,CAAA;AAGvD,OAAO,KAAK,EAAY,OAAO,EAAE,MAAM,aAAa,CAAA;AAMpD,OAAO,KAAK,EAAgB,gBAAgB,EAA6E,MAAM,YAAY,CAAA;AAY3I,qBAAa,UAAW,SAAQ,YAAY;;IAQxC,IAAI,YAAY,gCAEf;IAED,IAAI,MAAM,0BAET;gBAEY,OAAO,EAAE,WAAW,CAAC,oBAAoB,EAAE,MAAM,EAAE,OAAO,CAAC,UAAU;IA4B5E,KAAK;IAwCL,KAAK;IA2IX,OAAO,CAAC,cAAc;IAetB,WAAW,CAAE,MAAM,EAAE,gBAAgB;CAUxC"}
|
package/build/vite/server.js
CHANGED
|
@@ -39,7 +39,6 @@ export class ViteServer extends EventEmitter {
|
|
|
39
39
|
});
|
|
40
40
|
if (options.coverage && options.coverage.enabled) {
|
|
41
41
|
log.info('Capturing test coverage enabled');
|
|
42
|
-
// @ts-expect-error
|
|
43
42
|
this.#viteConfig.plugins?.push(istanbulPlugin({
|
|
44
43
|
cwd: config.rootDir,
|
|
45
44
|
include: DEFAULT_INCLUDE,
|
package/build/vite/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
import type { Environment, FrameworkPreset } from '../types.js';
|
|
3
|
-
export declare function getTemplate(options: WebdriverIO.BrowserRunnerOptions, env: Environment, spec: string
|
|
2
|
+
export declare function getTemplate(options: WebdriverIO.BrowserRunnerOptions, env: Environment, spec: string): Promise<string>;
|
|
4
3
|
export declare function userfriendlyImport(preset: FrameworkPreset, pkg?: string): Promise<any>;
|
|
5
4
|
export declare function normalizeId(id: string, base?: string): string;
|
|
6
5
|
export declare function getErrorTemplate(filename: string, error: Error): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/vite/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/vite/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAE/D,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,mBAyE1G;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,CAAC,EAAE,MAAM,gBAa7E;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAY7D;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,UAU9D"}
|
package/build/vite/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import url from 'node:url';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { resolve } from 'import-meta-resolve';
|
|
5
|
-
export async function getTemplate(options, env, spec
|
|
5
|
+
export async function getTemplate(options, env, spec) {
|
|
6
6
|
const root = options.rootDir || process.cwd();
|
|
7
7
|
const rootFileUrl = url.pathToFileURL(root).href;
|
|
8
8
|
let vueDeps = '';
|
|
@@ -37,11 +37,6 @@ export async function getTemplate(options, env, spec, processEnv = process.env)
|
|
|
37
37
|
<title>WebdriverIO Browser Test</title>
|
|
38
38
|
<link rel="icon" type="image/x-icon" href="https://webdriver.io/img/favicon.png">
|
|
39
39
|
<link rel="stylesheet" href="${mochaCSSHref}">
|
|
40
|
-
<script type="module">
|
|
41
|
-
window.process = {
|
|
42
|
-
env: ${JSON.stringify(processEnv)}
|
|
43
|
-
}
|
|
44
|
-
</script>
|
|
45
40
|
<script type="module">
|
|
46
41
|
/**
|
|
47
42
|
* Inject environment variables
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browser-runner",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.8",
|
|
4
4
|
"description": "A WebdriverIO runner to run unit tests tests in the browser.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-browser-runner",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@types/istanbul-lib-source-maps": "^4.0.1",
|
|
33
33
|
"@types/node": "^18.11.18",
|
|
34
34
|
"@vitest/spy": "^0.28.4",
|
|
35
|
-
"@wdio/globals": "8.3.
|
|
36
|
-
"@wdio/local-runner": "8.3.
|
|
35
|
+
"@wdio/globals": "8.3.8",
|
|
36
|
+
"@wdio/local-runner": "8.3.8",
|
|
37
37
|
"@wdio/logger": "8.1.0",
|
|
38
38
|
"@wdio/mocha-framework": "8.3.0",
|
|
39
39
|
"@wdio/protocols": "8.3.5",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vite": "^4.0.4",
|
|
54
54
|
"vite-plugin-istanbul": "^4.0.0",
|
|
55
55
|
"vite-plugin-top-level-await": "^1.2.2",
|
|
56
|
-
"webdriver": "8.3.
|
|
57
|
-
"webdriverio": "8.3.
|
|
56
|
+
"webdriver": "8.3.8",
|
|
57
|
+
"webdriverio": "8.3.8",
|
|
58
58
|
"ws": "^8.12.0"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/ws": "^8.5.4",
|
|
68
|
-
"@wdio/runner": "8.3.
|
|
68
|
+
"@wdio/runner": "8.3.8"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "a32ecf2abb9202d532fb98b7c23ceed9dbb2f6ee"
|
|
71
71
|
}
|