@vitest/browser 2.1.0 → 2.1.2
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/context.js +17 -1
- package/dist/client/.vite/manifest.json +2 -2
- package/dist/client/__vitest__/assets/{index-DsWp6aFQ.js → index-CADIw8eX.js} +5 -5
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/__vitest_browser__/orchestrator-N9hisloQ.js +1096 -0
- package/dist/client/__vitest_browser__/{tester-Bm6k0JOu.js → tester-iPUw4msx.js} +3 -0
- package/dist/client/orchestrator.html +1 -1
- package/dist/client/tester/tester.html +1 -1
- package/dist/index.js +23 -4
- package/dist/locators/preview.js +1 -1
- package/package.json +9 -9
- package/dist/client/__vitest_browser__/orchestrator-qtq9EW1J.js +0 -541
package/context.js
CHANGED
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
// empty file to not break bundling
|
|
2
1
|
// Vitest resolves "@vitest/browser/context" as a virtual module instead
|
|
2
|
+
|
|
3
|
+
// fake exports for static analysis
|
|
4
|
+
export const page = null
|
|
5
|
+
export const server = null
|
|
6
|
+
export const userEvent = null
|
|
7
|
+
export const cdp = null
|
|
8
|
+
export const commands = null
|
|
9
|
+
|
|
10
|
+
const pool = globalThis.__vitest_worker__?.ctx?.pool
|
|
11
|
+
|
|
12
|
+
throw new Error(
|
|
13
|
+
// eslint-disable-next-line prefer-template
|
|
14
|
+
'@vitest/browser/context can be imported only inside the Browser Mode. '
|
|
15
|
+
+ (pool
|
|
16
|
+
? `Your test is running in ${pool} pool. Make sure your regular tests are excluded from the "test.include" glob pattern.`
|
|
17
|
+
: 'Instead, it was imported outside of Vitest.'),
|
|
18
|
+
)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "preload-helper"
|
|
5
5
|
},
|
|
6
6
|
"orchestrator.html": {
|
|
7
|
-
"file": "__vitest_browser__/orchestrator-
|
|
7
|
+
"file": "__vitest_browser__/orchestrator-N9hisloQ.js",
|
|
8
8
|
"name": "orchestrator",
|
|
9
9
|
"src": "orchestrator.html",
|
|
10
10
|
"isEntry": true,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"tester/tester.html": {
|
|
16
|
-
"file": "__vitest_browser__/tester-
|
|
16
|
+
"file": "__vitest_browser__/tester-iPUw4msx.js",
|
|
17
17
|
"name": "tester",
|
|
18
18
|
"src": "tester/tester.html",
|
|
19
19
|
"isEntry": true,
|