@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/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?: Pick<BrowserTestRunOptions, 'shardedEntries'>,
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. This catches drift such as a dropped
35
- * `options` argument at the load boundary. No runtime side effect.
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
- RuntimeConfig,
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 = RuntimeConfig;
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 */