@wdio/browser-runner 8.8.6 → 8.8.7
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/mock.d.ts +1 -0
- package/build/browser/mock.d.ts.map +1 -1
- package/build/browser/mock.js +1 -0
- package/build/vite/utils.d.ts +1 -2
- package/build/vite/utils.d.ts.map +1 -1
- package/build/vite/utils.js +12 -8
- package/package.json +12 -12
package/build/browser/mock.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare const dirname: () => string;
|
|
|
21
21
|
export declare const resolve: () => string;
|
|
22
22
|
export declare const sep = "/";
|
|
23
23
|
export declare const type = "browser";
|
|
24
|
+
export declare const sync: () => void;
|
|
24
25
|
declare const _default: () => void;
|
|
25
26
|
export default _default;
|
|
26
27
|
//# sourceMappingURL=mock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/browser/mock.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAIzB,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAK,CAAA;AACnC,eAAO,MAAM,eAAe,IAAK,CAAA;AACjC,qBAAa,YAAY;CAAG;AAC5B,eAAO,MAAM,GAAG;;;;;CAAa,CAAA;AAC7B,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,GAAG,MAAM,CAAA;AACtB,eAAO,MAAM,IAAI,YAAY,CAAA
|
|
1
|
+
{"version":3,"file":"mock.d.ts","sourceRoot":"","sources":["../../src/browser/mock.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa;;;CAIzB,CAAA;AAED,eAAO,MAAM,iBAAiB,SAAK,CAAA;AACnC,eAAO,MAAM,eAAe,IAAK,CAAA;AACjC,qBAAa,YAAY;CAAG;AAC5B,eAAO,MAAM,GAAG;;;;;CAAa,CAAA;AAC7B,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,aAAa,cAAW,CAAA;AACrC,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,OAAO,cAAW,CAAA;AAC/B,eAAO,MAAM,GAAG,MAAM,CAAA;AACtB,eAAO,MAAM,IAAI,YAAY,CAAA;AAC7B,eAAO,MAAM,IAAI,YAAW,CAAA;;AAC5B,wBAAuB"}
|
package/build/browser/mock.js
CHANGED
package/build/vite/utils.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
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, p?: NodeJS.Process): 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 getFilesFromDirectory(dir: string): Promise<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":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAI/D,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,CAAC,oBAAoB,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,iBAAU,mBAiGvH;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,wBAAsB,qBAAqB,CAAE,GAAG,EAAE,MAAM,qBAqBvD;AAGD,wBAAsB,cAAc,CAAC,WAAW,EAAE,MAAM,+BAgBvD;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,UAU9D"}
|
package/build/vite/utils.js
CHANGED
|
@@ -5,7 +5,7 @@ import logger from '@wdio/logger';
|
|
|
5
5
|
import { resolve } from 'import-meta-resolve';
|
|
6
6
|
import { MOCHA_VARIABELS } from '../constants.js';
|
|
7
7
|
const log = logger('@wdio/browser-runner');
|
|
8
|
-
export async function getTemplate(options, env, spec,
|
|
8
|
+
export async function getTemplate(options, env, spec, p = process) {
|
|
9
9
|
const root = options.rootDir || process.cwd();
|
|
10
10
|
const rootFileUrl = url.pathToFileURL(root).href;
|
|
11
11
|
const isHeadless = options.headless || Boolean(process.env.CI);
|
|
@@ -35,12 +35,14 @@ export async function getTemplate(options, env, spec, processEnv = process.env)
|
|
|
35
35
|
}
|
|
36
36
|
let sourceMapScript = '';
|
|
37
37
|
let sourceMapSetupCommand = '';
|
|
38
|
-
|
|
38
|
+
try {
|
|
39
|
+
const sourceMapSupportDir = await resolve('source-map-support', import.meta.url);
|
|
39
40
|
sourceMapScript = /*html*/ `<script src="/@fs/${url.fileURLToPath(path.dirname(sourceMapSupportDir))}/browser-source-map-support.js"></script>`;
|
|
40
41
|
sourceMapSetupCommand = 'sourceMapSupport.install()';
|
|
41
|
-
}
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
42
44
|
log.error(`Failed to setup source-map-support: ${err.message}`);
|
|
43
|
-
}
|
|
45
|
+
}
|
|
44
46
|
return /* html */ `
|
|
45
47
|
<!doctype html>
|
|
46
48
|
<html>
|
|
@@ -70,10 +72,12 @@ export async function getTemplate(options, env, spec, processEnv = process.env)
|
|
|
70
72
|
/**
|
|
71
73
|
* mock process
|
|
72
74
|
*/
|
|
73
|
-
window.process = {
|
|
75
|
+
window.process = window.process || {
|
|
74
76
|
platform: 'browser',
|
|
75
|
-
env: {},
|
|
76
|
-
stdout: {}
|
|
77
|
+
env: ${JSON.stringify(p.env)},
|
|
78
|
+
stdout: {},
|
|
79
|
+
stderr: {},
|
|
80
|
+
cwd: () => '${p.cwd()}',
|
|
77
81
|
}
|
|
78
82
|
</script>
|
|
79
83
|
<script type="module" src="@wdio/browser-runner/setup"></script>
|
|
@@ -91,7 +95,7 @@ export async function getTemplate(options, env, spec, processEnv = process.env)
|
|
|
91
95
|
<body>
|
|
92
96
|
<mocha-framework spec="${spec}" ${isHeadless ? 'style="display: none"' : ''}></mocha-framework>
|
|
93
97
|
<script type="module">
|
|
94
|
-
window.process.env = ${JSON.stringify(
|
|
98
|
+
window.process.env = ${JSON.stringify(p.env)}
|
|
95
99
|
</script>
|
|
96
100
|
</body>
|
|
97
101
|
</html>`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browser-runner",
|
|
3
|
-
"version": "8.8.
|
|
3
|
+
"version": "8.8.7",
|
|
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",
|
|
@@ -35,19 +35,19 @@
|
|
|
35
35
|
"@types/istanbul-lib-source-maps": "^4.0.1",
|
|
36
36
|
"@types/node": "^18.15.3",
|
|
37
37
|
"@vitest/spy": "^0.30.0",
|
|
38
|
-
"@wdio/globals": "8.8.
|
|
39
|
-
"@wdio/local-runner": "8.8.
|
|
38
|
+
"@wdio/globals": "8.8.7",
|
|
39
|
+
"@wdio/local-runner": "8.8.7",
|
|
40
40
|
"@wdio/logger": "8.6.6",
|
|
41
|
-
"@wdio/mocha-framework": "8.8.
|
|
41
|
+
"@wdio/mocha-framework": "8.8.7",
|
|
42
42
|
"@wdio/protocols": "8.8.1",
|
|
43
|
-
"@wdio/types": "8.8.
|
|
44
|
-
"@wdio/utils": "8.8.
|
|
43
|
+
"@wdio/types": "8.8.7",
|
|
44
|
+
"@wdio/utils": "8.8.7",
|
|
45
45
|
"ast-types": "^0.14.2",
|
|
46
46
|
"deepmerge-ts": "^5.0.0",
|
|
47
47
|
"expect-webdriverio": "^4.1.2",
|
|
48
48
|
"fast-safe-stringify": "^2.1.1",
|
|
49
49
|
"get-port": "^6.1.2",
|
|
50
|
-
"import-meta-resolve": "^
|
|
50
|
+
"import-meta-resolve": "^3.0.0",
|
|
51
51
|
"istanbul-lib-coverage": "^3.2.0",
|
|
52
52
|
"istanbul-lib-report": "^3.0.0",
|
|
53
53
|
"istanbul-lib-source-maps": "^4.0.1",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"recast": "^0.22.0",
|
|
57
57
|
"serialize-error": "^11.0.0",
|
|
58
58
|
"source-map-support": "^0.5.21",
|
|
59
|
-
"vite": "
|
|
59
|
+
"vite": "~4.2.0",
|
|
60
60
|
"vite-plugin-istanbul": "^4.0.1",
|
|
61
61
|
"vite-plugin-top-level-await": "^1.3.0",
|
|
62
|
-
"webdriver": "8.8.
|
|
63
|
-
"webdriverio": "8.8.
|
|
62
|
+
"webdriver": "8.8.7",
|
|
63
|
+
"webdriverio": "8.8.7",
|
|
64
64
|
"ws": "^8.13.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/ws": "^8.5.4",
|
|
74
|
-
"@wdio/runner": "8.8.
|
|
74
|
+
"@wdio/runner": "8.8.7"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "c8f7c7298308b5d313d88a16fdd58f241fdeec52"
|
|
77
77
|
}
|