@rstest/browser 0.11.1 → 0.11.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/dist/browser-container/container-static/js/{328.37af068e21.js → 117.3da95caa39.js} +1006 -1006
- package/dist/browser-container/container-static/js/117.3da95caa39.js.LICENSE.txt +1 -0
- package/dist/browser-container/container-static/js/{index.c8fe4ff310.js → index.6e4da8c9ab.js} +9 -9
- package/dist/browser-container/index.html +1 -1
- package/dist/browserExecutor.d.ts +11 -0
- package/dist/configValidation.d.ts +6 -1
- package/dist/hostController.d.ts +2 -6
- package/dist/index.d.ts +4 -3
- package/dist/index.js +539 -292
- package/dist/protocol.d.ts +2 -2
- package/package.json +4 -4
- package/src/AGENTS.md +17 -1
- package/src/browserExecutor.ts +138 -0
- package/src/client/AGENTS.md +20 -13
- package/src/client/entry.ts +62 -2
- package/src/client/snapshot.ts +1 -2
- package/src/concurrency.ts +42 -25
- package/src/configValidation.ts +182 -1
- package/src/hostController.ts +476 -337
- package/src/index.ts +9 -5
- package/src/protocol.ts +2 -2
- package/dist/browser-container/container-static/js/328.37af068e21.js.LICENSE.txt +0 -1
package/src/index.ts
CHANGED
|
@@ -2,8 +2,10 @@ import type {
|
|
|
2
2
|
BrowserHostModule,
|
|
3
3
|
BrowserTestRunOptions,
|
|
4
4
|
BrowserTestRunResult,
|
|
5
|
+
ListBrowserTestsOptions,
|
|
5
6
|
RstestContext,
|
|
6
7
|
} from '@rstest/core/internal/browser';
|
|
8
|
+
import { createBrowserExecutor } from './browserExecutor';
|
|
7
9
|
import { validateBrowserConfig } from './configValidation';
|
|
8
10
|
import {
|
|
9
11
|
type ListBrowserTestsResult,
|
|
@@ -11,7 +13,7 @@ import {
|
|
|
11
13
|
runBrowserController,
|
|
12
14
|
} from './hostController';
|
|
13
15
|
|
|
14
|
-
export { validateBrowserConfig };
|
|
16
|
+
export { createBrowserExecutor, validateBrowserConfig };
|
|
15
17
|
|
|
16
18
|
export async function runBrowserTests(
|
|
17
19
|
context: RstestContext,
|
|
@@ -22,7 +24,7 @@ export async function runBrowserTests(
|
|
|
22
24
|
|
|
23
25
|
export async function listBrowserTests(
|
|
24
26
|
context: RstestContext,
|
|
25
|
-
options?:
|
|
27
|
+
options?: ListBrowserTestsOptions,
|
|
26
28
|
): Promise<ListBrowserTestsResult> {
|
|
27
29
|
// Forward `options` (e.g. `shardedEntries`) so `rstest list --shard` lists
|
|
28
30
|
// only the current shard's browser test files, matching the run path.
|
|
@@ -31,13 +33,15 @@ export async function listBrowserTests(
|
|
|
31
33
|
|
|
32
34
|
/**
|
|
33
35
|
* Compile-time guard: ensure the public host exports satisfy the core-owned
|
|
34
|
-
* {@link BrowserHostModule} contract
|
|
35
|
-
*
|
|
36
|
+
* {@link BrowserHostModule} contract (`listBrowserTests` stays a plain public
|
|
37
|
+
* export — core lists through `createBrowserExecutor(...).collect()`). This
|
|
38
|
+
* catches drift such as a dropped `options` argument at the load boundary.
|
|
39
|
+
* No runtime side effect.
|
|
36
40
|
*/
|
|
37
41
|
void ({
|
|
38
42
|
validateBrowserConfig,
|
|
43
|
+
createBrowserExecutor,
|
|
39
44
|
runBrowserTests,
|
|
40
|
-
listBrowserTests,
|
|
41
45
|
} satisfies BrowserHostModule);
|
|
42
46
|
|
|
43
47
|
export type {
|
package/src/protocol.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { BrowserViewport } from '@rstest/core/internal/browser';
|
|
2
2
|
import type {
|
|
3
|
-
|
|
3
|
+
BrowserRuntimeConfig,
|
|
4
4
|
TestFileResult,
|
|
5
5
|
TestInfo,
|
|
6
6
|
TestResult,
|
|
@@ -28,7 +28,7 @@ export const DISPATCH_NAMESPACE_BROWSER = 'browser';
|
|
|
28
28
|
export const DISPATCH_NAMESPACE_SNAPSHOT = 'snapshot';
|
|
29
29
|
export const DISPATCH_METHOD_RPC = 'rpc';
|
|
30
30
|
|
|
31
|
-
export type SerializedRuntimeConfig =
|
|
31
|
+
export type SerializedRuntimeConfig = BrowserRuntimeConfig;
|
|
32
32
|
|
|
33
33
|
// `BrowserViewport` is a core config type (`@rstest/core` owns the canonical
|
|
34
34
|
// definition used by `NormalizedBrowserModeConfig`). Re-export it so the host
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! LICENSE: 328.37af068e21.js.LICENSE.txt */
|