@wdio/browser-runner 8.28.4 → 8.28.6
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/browser/frameworks/mocha.ts"],"names":[],"mappings":"AA6BA,qBAAa,cAAe,SAAQ,WAAW;;;IAyB3C,MAAM,KAAK,kBAAkB,aAE5B;IAED,IAAI,IAAI,WAEP;IAED,iBAAiB;IAWjB,wBAAwB,CAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO;IAatE,GAAG;
|
|
1
|
+
{"version":3,"file":"mocha.d.ts","sourceRoot":"","sources":["../../../src/browser/frameworks/mocha.ts"],"names":[],"mappings":"AA6BA,qBAAa,cAAe,SAAQ,WAAW;;;IAyB3C,MAAM,KAAK,kBAAkB,aAE5B;IAED,IAAI,IAAI,WAEP;IAED,iBAAiB;IAWjB,wBAAwB,CAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO;IAatE,GAAG;CAwIZ"}
|
|
@@ -107,16 +107,18 @@ export class MochaFramework extends HTMLElement {
|
|
|
107
107
|
setupEnv(cid, window.__wdioEnv__.args, beforeTest, beforeHook, afterTest, afterHook);
|
|
108
108
|
const self = this;
|
|
109
109
|
const mochaBeforeHook = globalThis.before || globalThis.suiteSetup;
|
|
110
|
-
mochaBeforeHook(function () {
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
mochaBeforeHook(async function () {
|
|
111
|
+
const { title, tests, pending, delayed } = this.test?.parent?.suites[0] || {};
|
|
112
|
+
await self.#getHook('beforeSuite')({
|
|
113
|
+
...({ title, tests, pending, delayed }),
|
|
113
114
|
file,
|
|
114
115
|
});
|
|
115
116
|
});
|
|
116
117
|
const mochaAfterHook = globalThis.after || globalThis.suiteTeardown;
|
|
117
|
-
mochaAfterHook(function () {
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
mochaAfterHook(async function () {
|
|
119
|
+
const { title, tests, pending, delayed } = this.test?.parent?.suites[0] || {};
|
|
120
|
+
await self.#getHook('afterSuite')({
|
|
121
|
+
...({ title, tests, pending, delayed }),
|
|
120
122
|
file,
|
|
121
123
|
duration: Date.now() - startTime
|
|
122
124
|
});
|
|
@@ -143,8 +145,7 @@ export class MochaFramework extends HTMLElement {
|
|
|
143
145
|
/**
|
|
144
146
|
* propagate results to browser so it can be picked up by the runner
|
|
145
147
|
*/
|
|
146
|
-
|
|
147
|
-
window.__wdioFailures__ = failures;
|
|
148
|
+
this.#sendTestReport({ failures, events: this.#runnerEvents });
|
|
148
149
|
console.log(`[WDIO] Finished test suite in ${Date.now() - startTime}ms`);
|
|
149
150
|
}
|
|
150
151
|
#handleSocketMessage(message) {
|
|
@@ -180,6 +181,12 @@ export class MochaFramework extends HTMLElement {
|
|
|
180
181
|
value: JSON.parse(safeStringify(value))
|
|
181
182
|
};
|
|
182
183
|
}
|
|
184
|
+
#sendTestReport(value) {
|
|
185
|
+
import.meta.hot?.send(WDIO_EVENT_NAME, {
|
|
186
|
+
type: MESSAGE_TYPES.browserTestResult,
|
|
187
|
+
value: JSON.parse(safeStringify(value))
|
|
188
|
+
});
|
|
189
|
+
}
|
|
183
190
|
}
|
|
184
191
|
const template = document.createElement('template');
|
|
185
192
|
template.innerHTML = /*html*/ `
|
package/build/browser/setup.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/browser/setup.ts"],"names":[],"mappings":"AAOA,OAAO,uBAAuB,CAAA;AAI9B,KAAK,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,CAAA;AAC9D,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,KAAK,CAAC,EAAE,GAAG,CAAA;QACX,eAAe,EAAE,MAAM,CAAA;QACvB,cAAc,EAAE,cAAc,EAAE,CAAA;QAChC,YAAY,EAAE,MAAM,CAAA;QACpB,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/browser/setup.ts"],"names":[],"mappings":"AAOA,OAAO,uBAAuB,CAAA;AAI9B,KAAK,cAAc,GAAG,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,CAAA;AAC9D,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,MAAM;QACZ,KAAK,CAAC,EAAE,GAAG,CAAA;QACX,eAAe,EAAE,MAAM,CAAA;QACvB,cAAc,EAAE,cAAc,EAAE,CAAA;QAChC,YAAY,EAAE,MAAM,CAAA;QACpB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;KACtC;CACJ"}
|
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,WAAW,MAAM,oBAAoB,CAAA;AAK5C,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAA;AAU/G,OAAO,KAAK,EAAE,oBAAoB,IAAI,0BAA0B,EAAmB,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAI5H,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,WAAW;;IAU9C,OAAO,CAAC,OAAO;IACf,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU;gBAD7B,OAAO,EAAE,0BAA0B,EACjC,OAAO,EAAE,OAAO,CAAC,UAAU;IAwBzC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAgB;IAEhC;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,CAAC,UAAU,EAAE,MAAM,QAAI;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,IAAI,GAAG,eAAe,CAAC,CAAC,CAAC,CAAA;AACnE,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC,CAAA;AACpE,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE;IACxC,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AACnB,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE;IACxC,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;CACd,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;AACvB,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE;IACxC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAC5B,wBAAgB,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE;IACxC,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;CACd,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAA"}
|
package/build/index.js
CHANGED
|
@@ -103,8 +103,12 @@ export default class BrowserRunner extends LocalRunner {
|
|
|
103
103
|
}
|
|
104
104
|
async _generateCoverageReports() {
|
|
105
105
|
const coverageMaps = this.#communicator.coverageMaps;
|
|
106
|
+
/**
|
|
107
|
+
* if no coverage was collected we don't need to do anything
|
|
108
|
+
* and return `true` which will mark the test as successful
|
|
109
|
+
*/
|
|
106
110
|
if (!this.#coverageOptions.enabled || coverageMaps.length === 0) {
|
|
107
|
-
return
|
|
111
|
+
return true;
|
|
108
112
|
}
|
|
109
113
|
const firstCoverageMapEntry = coverageMaps.shift();
|
|
110
114
|
const coverageMap = libCoverage.createCoverageMap(firstCoverageMapEntry);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/browser-runner",
|
|
3
|
-
"version": "8.28.
|
|
3
|
+
"version": "8.28.6",
|
|
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",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"@originjs/vite-plugin-commonjs": "^1.0.3",
|
|
35
35
|
"@types/istanbul-lib-source-maps": "^4.0.1",
|
|
36
36
|
"@vitest/spy": "^1.0.1",
|
|
37
|
-
"@wdio/globals": "8.28.
|
|
38
|
-
"@wdio/local-runner": "8.28.
|
|
37
|
+
"@wdio/globals": "8.28.6",
|
|
38
|
+
"@wdio/local-runner": "8.28.6",
|
|
39
39
|
"@wdio/logger": "8.28.0",
|
|
40
|
-
"@wdio/mocha-framework": "8.28.
|
|
40
|
+
"@wdio/mocha-framework": "8.28.6",
|
|
41
41
|
"@wdio/protocols": "^8.24.12",
|
|
42
|
-
"@wdio/runner": "8.28.
|
|
43
|
-
"@wdio/types": "8.28.
|
|
44
|
-
"@wdio/utils": "8.28.
|
|
42
|
+
"@wdio/runner": "8.28.6",
|
|
43
|
+
"@wdio/types": "8.28.6",
|
|
44
|
+
"@wdio/utils": "8.28.6",
|
|
45
45
|
"deepmerge-ts": "^5.0.0",
|
|
46
46
|
"expect": "^29.7.0",
|
|
47
47
|
"expect-webdriverio": "^4.8.1",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"vite": "~4.5.0",
|
|
60
60
|
"vite-plugin-istanbul": "^5.0.0",
|
|
61
61
|
"vite-plugin-top-level-await": "^1.3.0",
|
|
62
|
-
"webdriver": "8.28.
|
|
63
|
-
"webdriverio": "8.28.
|
|
62
|
+
"webdriver": "8.28.6",
|
|
63
|
+
"webdriverio": "8.28.6"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"prepare": "rimraf node_modules/@wdio/config node_modules/@wdio/repl node_modules/@wdio/utils"
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "22402f1129cc993b1c8d6bb483c95248b2679c65"
|
|
72
72
|
}
|