@rstest/browser 0.10.3 → 0.10.5
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/626.js +2 -1
- package/dist/browser-container/container-static/css/index.0521ff95b1.css +1 -0
- package/dist/browser-container/container-static/js/{27.099feaf1da.js → 854.c59f71483d.js} +5728 -5756
- package/dist/browser-container/container-static/js/854.c59f71483d.js.LICENSE.txt +1 -0
- package/dist/browser-container/container-static/js/{index.be8c8d2626.js → index.fedc31dff3.js} +109 -136
- package/dist/browser-container/container-static/js/{lib-react.5ae9b90ee5.js → lib-react.62b27a21db.js} +21 -21
- package/dist/browser-container/container-static/js/lib-react.62b27a21db.js.LICENSE.txt +1 -0
- package/dist/browser-container/index.html +1 -1
- package/dist/browser.js +4 -4
- package/dist/browserRpcRegistry.d.ts +1 -2
- package/dist/client/api.d.ts +1 -1
- package/dist/client/dispatchTransport.d.ts +18 -1
- package/dist/client/locator.d.ts +2 -3
- package/dist/concurrency.d.ts +5 -3
- package/dist/configValidation.d.ts +2 -2
- package/dist/dispatchCapabilities.d.ts +3 -3
- package/dist/dispatchRouter.d.ts +2 -3
- package/dist/headedSerialTaskQueue.d.ts +5 -5
- package/dist/headlessLatestRerunScheduler.d.ts +2 -3
- package/dist/headlessTransport.d.ts +2 -3
- package/dist/hostController.d.ts +12 -9
- package/dist/index.d.ts +6 -6
- package/dist/index.js +169 -216
- package/dist/protocol.d.ts +78 -55
- package/dist/providers/index.d.ts +18 -20
- package/dist/providers/playwright/dispatchBrowserRpc.d.ts +5 -3
- package/dist/providers/playwright/expectUtils.d.ts +2 -3
- package/dist/providers/playwright/implementation.d.ts +1 -1
- package/dist/providers/playwright/runtime.d.ts +1 -1
- package/dist/rpcProtocol.d.ts +36 -29
- package/dist/runSession.d.ts +3 -5
- package/dist/sessionRegistry.d.ts +2 -3
- package/dist/sourceMap/sourceMapLoader.d.ts +2 -2
- package/dist/viewportPresets.d.ts +7 -3
- package/dist/watchCliShortcuts.d.ts +1 -1
- package/dist/watchRerunPlanner.d.ts +2 -2
- package/package.json +7 -9
- package/src/AGENTS.md +7 -1
- package/src/browserRpcRegistry.ts +2 -2
- package/src/client/dispatchTransport.ts +63 -1
- package/src/client/entry.ts +25 -58
- package/src/client/public.ts +3 -3
- package/src/client/snapshot.ts +24 -22
- package/src/client/sourceMapSupport.ts +1 -1
- package/src/concurrency.ts +7 -21
- package/src/configValidation.ts +2 -2
- package/src/dispatchCapabilities.ts +102 -83
- package/src/env.d.ts +6 -2
- package/src/headedSerialTaskQueue.ts +5 -1
- package/src/hostController.ts +85 -43
- package/src/index.ts +22 -11
- package/src/protocol.ts +66 -22
- package/src/providers/index.ts +8 -1
- package/src/rpcProtocol.ts +34 -21
- package/src/viewportPresets.ts +5 -0
- package/src/watchCliShortcuts.ts +2 -4
- package/dist/browser-container/container-static/css/index.5c72297783.css +0 -1
- package/dist/browser-container/container-static/js/27.099feaf1da.js.LICENSE.txt +0 -1
- package/dist/browser-container/container-static/js/lib-react.5ae9b90ee5.js.LICENSE.txt +0 -1
- package/dist/client/entry.d.ts +0 -4
- package/dist/client/fakeTimersStub.d.ts +0 -25
- package/dist/client/public.d.ts +0 -9
- package/dist/client/snapshot.d.ts +0 -29
- package/dist/client/sourceMapSupport.d.ts +0 -42
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export type FakeTimerInstallOpts = Record<string, unknown>;
|
|
2
|
-
export type FakeTimerWithContext = {
|
|
3
|
-
timers: Record<string, unknown>;
|
|
4
|
-
};
|
|
5
|
-
export type InstalledClock = {
|
|
6
|
-
now: number;
|
|
7
|
-
reset: () => void;
|
|
8
|
-
uninstall: () => void;
|
|
9
|
-
runAll: () => void;
|
|
10
|
-
runAllAsync: () => Promise<void>;
|
|
11
|
-
runToLast: () => void;
|
|
12
|
-
runToLastAsync: () => Promise<void>;
|
|
13
|
-
tick: (ms: number) => void;
|
|
14
|
-
tickAsync: (ms: number) => Promise<void>;
|
|
15
|
-
next: () => void;
|
|
16
|
-
nextAsync: () => Promise<void>;
|
|
17
|
-
runToFrame: () => void;
|
|
18
|
-
runMicrotasks: () => void;
|
|
19
|
-
setSystemTime: (now?: number | Date) => void;
|
|
20
|
-
countTimers: () => number;
|
|
21
|
-
};
|
|
22
|
-
export declare const withGlobal: (_global: typeof globalThis) => {
|
|
23
|
-
timers: {};
|
|
24
|
-
install: (_config?: FakeTimerInstallOpts) => InstalledClock;
|
|
25
|
-
};
|
package/dist/client/public.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Re-export runtime API from @rstest/core/browser-runtime for browser use.
|
|
3
|
-
* This file is used as an alias target for '@rstest/core' in browser mode.
|
|
4
|
-
*
|
|
5
|
-
* Uses @rstest/core/browser-runtime which only exports the test APIs
|
|
6
|
-
* (describe, it, expect, etc.) without any Node.js dependencies.
|
|
7
|
-
*/
|
|
8
|
-
export type { Assertion, Mock } from '@rstest/core';
|
|
9
|
-
export * from '@rstest/core/browser-runtime';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser snapshot environment that proxies file operations to the host
|
|
3
|
-
* via postMessage RPC through the container.
|
|
4
|
-
*/
|
|
5
|
-
export declare class BrowserSnapshotEnvironment {
|
|
6
|
-
getVersion(): string;
|
|
7
|
-
getHeader(): string;
|
|
8
|
-
resolveRawPath(_testPath: string, rawPath: string): Promise<string>;
|
|
9
|
-
resolvePath(filepath: string): Promise<string>;
|
|
10
|
-
prepareDirectory(): Promise<void>;
|
|
11
|
-
saveSnapshotFile(filepath: string, snapshot: string): Promise<void>;
|
|
12
|
-
readSnapshotFile(filepath: string): Promise<string | null>;
|
|
13
|
-
removeSnapshotFile(filepath: string): Promise<void>;
|
|
14
|
-
/**
|
|
15
|
-
* Process stack trace for inline snapshots.
|
|
16
|
-
* Maps bundled URLs back to original source file paths.
|
|
17
|
-
*/
|
|
18
|
-
processStackTrace(stack: {
|
|
19
|
-
file: string;
|
|
20
|
-
line: number;
|
|
21
|
-
column: number;
|
|
22
|
-
method: string;
|
|
23
|
-
}): {
|
|
24
|
-
file: string;
|
|
25
|
-
line: number;
|
|
26
|
-
column: number;
|
|
27
|
-
method: string;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get all script URLs currently on the page.
|
|
3
|
-
* Used to detect newly loaded chunk scripts.
|
|
4
|
-
*/
|
|
5
|
-
export declare const getScriptUrls: () => Set<string>;
|
|
6
|
-
/**
|
|
7
|
-
* Find the newly added script URL by comparing script sets.
|
|
8
|
-
* Returns the first new script URL found, or null if none.
|
|
9
|
-
*/
|
|
10
|
-
export declare const findNewScriptUrl: (beforeUrls: Set<string>, afterUrls: Set<string>) => string | null;
|
|
11
|
-
/**
|
|
12
|
-
* Preload source map for a test file's chunk URL.
|
|
13
|
-
*
|
|
14
|
-
* Always fetches fresh source map to handle file changes during watch mode.
|
|
15
|
-
*
|
|
16
|
-
* @param chunkUrl - The full URL of the chunk JS file
|
|
17
|
-
*/
|
|
18
|
-
export declare const preloadTestFileSourceMap: (chunkUrl: string) => Promise<void>;
|
|
19
|
-
/**
|
|
20
|
-
* Preload source map for the runner.js file.
|
|
21
|
-
*
|
|
22
|
-
* This is essential for inline snapshot support because the snapshot code
|
|
23
|
-
* runs in runner.js (which contains @rstest/core/browser-runtime).
|
|
24
|
-
* Without this, stack traces from inline snapshots cannot be mapped back
|
|
25
|
-
* to the original source files.
|
|
26
|
-
*/
|
|
27
|
-
export declare const preloadRunnerSourceMap: () => Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Stack frame interface matching @vitest/snapshot's format
|
|
30
|
-
*/
|
|
31
|
-
interface StackFrame {
|
|
32
|
-
file: string;
|
|
33
|
-
line: number;
|
|
34
|
-
column: number;
|
|
35
|
-
method?: string;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Map a stack frame from bundled URL to original source file.
|
|
39
|
-
* This is used by BrowserSnapshotEnvironment.processStackTrace
|
|
40
|
-
*/
|
|
41
|
-
export declare const mapStackFrame: (frame: StackFrame) => StackFrame;
|
|
42
|
-
export {};
|