@vitest/browser 0.32.4 → 0.34.0
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/dist/client/__vitest__/assets/{index-55f17930.css → index-46946a8e.css} +1 -1
- package/dist/client/__vitest__/assets/index-5fc7369b.js +35 -0
- package/dist/client/__vitest__/index.html +2 -2
- package/dist/client/{assets/index-25555a49.js → __vitest_browser__/index-76056b5d.js} +8 -4
- package/dist/client/index.html +1 -1
- package/dist/index.js +2 -1464
- package/package.json +9 -8
- package/dist/client/__vitest__/assets/index-0b6d2654.js +0 -35
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
})()
|
|
18
18
|
</script>
|
|
19
19
|
<!-- !LOAD_METADATA! -->
|
|
20
|
-
<script type="module" crossorigin src="./assets/index-
|
|
21
|
-
<link rel="stylesheet" href="./assets/index-
|
|
20
|
+
<script type="module" crossorigin src="./assets/index-5fc7369b.js"></script>
|
|
21
|
+
<link rel="stylesheet" href="./assets/index-46946a8e.css">
|
|
22
22
|
</head>
|
|
23
23
|
<body>
|
|
24
24
|
<div id="app"></div>
|
|
@@ -368,7 +368,6 @@ class StateManager {
|
|
|
368
368
|
constructor() {
|
|
369
369
|
__publicField(this, "filesMap", /* @__PURE__ */ new Map());
|
|
370
370
|
__publicField(this, "pathsSet", /* @__PURE__ */ new Set());
|
|
371
|
-
__publicField(this, "collectingPromise");
|
|
372
371
|
__publicField(this, "browserTestPromises", /* @__PURE__ */ new Map());
|
|
373
372
|
__publicField(this, "idMap", /* @__PURE__ */ new Map());
|
|
374
373
|
__publicField(this, "taskFileMap", /* @__PURE__ */ new WeakMap());
|
|
@@ -427,7 +426,9 @@ class StateManager {
|
|
|
427
426
|
this.updateId(file);
|
|
428
427
|
});
|
|
429
428
|
}
|
|
430
|
-
|
|
429
|
+
// this file is reused by ws-client, and shoult not rely on heavy dependencies like workspace
|
|
430
|
+
clearFiles(_project, paths = []) {
|
|
431
|
+
const project = _project;
|
|
431
432
|
paths.forEach((path) => {
|
|
432
433
|
const files = this.filesMap.get(path);
|
|
433
434
|
if (!files)
|
|
@@ -656,9 +657,9 @@ function createBrowserRunner(original, coverageModule) {
|
|
|
656
657
|
}
|
|
657
658
|
}
|
|
658
659
|
}
|
|
659
|
-
async
|
|
660
|
+
async onAfterRun() {
|
|
660
661
|
var _a, _b;
|
|
661
|
-
await ((_a = super.
|
|
662
|
+
await ((_a = super.onAfterRun) == null ? void 0 : _a.call(this));
|
|
662
663
|
const coverage = await ((_b = coverageModule == null ? void 0 : coverageModule.takeCoverage) == null ? void 0 : _b.call(coverageModule));
|
|
663
664
|
await rpc().onAfterSuiteRun({ coverage });
|
|
664
665
|
}
|
|
@@ -880,6 +881,9 @@ ws.addEventListener("open", async () => {
|
|
|
880
881
|
globalThis.__vitest_worker__ = {
|
|
881
882
|
config,
|
|
882
883
|
browserHashMap,
|
|
884
|
+
environment: {
|
|
885
|
+
name: "browser"
|
|
886
|
+
},
|
|
883
887
|
// @ts-expect-error untyped global for internal use
|
|
884
888
|
moduleCache: globalThis.__vi_module_cache__,
|
|
885
889
|
rpc: client.rpc,
|
package/dist/client/index.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
border: none;
|
|
22
22
|
}
|
|
23
23
|
</style>
|
|
24
|
-
<script type="module" crossorigin src="/
|
|
24
|
+
<script type="module" crossorigin src="/__vitest_browser__/index-76056b5d.js"></script>
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<iframe id="vitest-ui" src=""></iframe>
|