@rstest/core 0.5.3 → 0.6.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/LICENSE.md +1 -1
- package/dist/{0~816.js → 0~628.js} +41 -110
- package/dist/0~655.js +121 -121
- package/dist/0~85.js +1 -1
- package/dist/importActualLoader.mjs +1 -0
- package/dist/index.js +64 -44
- package/dist/mockRuntimeCode.js +118 -0
- package/dist/worker.js +39 -19
- package/dist-types/index.d.ts +12 -1
- package/dist-types/worker.d.ts +13 -1
- package/package.json +11 -11
package/dist-types/worker.d.ts
CHANGED
|
@@ -1614,7 +1614,7 @@ declare type OnTestFinishedHandler = (params: {
|
|
|
1614
1614
|
};
|
|
1615
1615
|
}) => MaybePromise<void>;
|
|
1616
1616
|
|
|
1617
|
-
declare type OptionalKeys = 'testNamePattern' | 'plugins' | 'source' | 'resolve' | 'output' | 'performance' | 'tools' | 'dev' | 'onConsoleLog';
|
|
1617
|
+
declare type OptionalKeys = 'testNamePattern' | 'plugins' | 'source' | 'resolve' | 'output' | 'performance' | 'tools' | 'dev' | 'onConsoleLog' | 'resolveSnapshotPath';
|
|
1618
1618
|
|
|
1619
1619
|
declare type OptionsReceived = PrettyFormatOptions;
|
|
1620
1620
|
|
|
@@ -1882,6 +1882,12 @@ declare interface RstestConfig {
|
|
|
1882
1882
|
* @default ['default']
|
|
1883
1883
|
*/
|
|
1884
1884
|
reporters?: Reporter | BuiltInReporterNames | (Reporter | BuiltInReporterNames | [BuiltInReporterNames] | ReporterWithOptions)[];
|
|
1885
|
+
/**
|
|
1886
|
+
* Hide skipped tests logs.
|
|
1887
|
+
*
|
|
1888
|
+
* @default false
|
|
1889
|
+
*/
|
|
1890
|
+
hideSkippedTests?: boolean;
|
|
1885
1891
|
/**
|
|
1886
1892
|
* Run only tests with a name that matches the regex.
|
|
1887
1893
|
*/
|
|
@@ -1937,6 +1943,10 @@ declare interface RstestConfig {
|
|
|
1937
1943
|
onConsoleLog?: (content: string) => boolean | void;
|
|
1938
1944
|
/** Format snapshot output */
|
|
1939
1945
|
snapshotFormat?: SnapshotFormat;
|
|
1946
|
+
/**
|
|
1947
|
+
* Resolve custom snapshot path
|
|
1948
|
+
*/
|
|
1949
|
+
resolveSnapshotPath?: (testPath: string, snapExtension: string) => string;
|
|
1940
1950
|
/**
|
|
1941
1951
|
* Custom environment variables available on `process.env` during tests.
|
|
1942
1952
|
*/
|
|
@@ -2027,6 +2037,7 @@ declare type RuntimeRPC = {
|
|
|
2027
2037
|
}>;
|
|
2028
2038
|
onTestCaseResult: (result: TestResult) => Promise<void>;
|
|
2029
2039
|
onConsoleLog: (log: UserConsoleLog) => void;
|
|
2040
|
+
resolveSnapshotPath: (filepath: string) => string;
|
|
2030
2041
|
};
|
|
2031
2042
|
|
|
2032
2043
|
declare type RunWorkerOptions = {
|
|
@@ -2470,6 +2481,7 @@ declare type WorkerContext = {
|
|
|
2470
2481
|
projectRoot: ProjectContext['rootPath'];
|
|
2471
2482
|
project: string;
|
|
2472
2483
|
runtimeConfig: RuntimeConfig;
|
|
2484
|
+
taskId: number;
|
|
2473
2485
|
};
|
|
2474
2486
|
|
|
2475
2487
|
declare type XInput = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstest/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The Rsbuild-based test tool.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rstest/issues"
|
|
@@ -47,20 +47,20 @@
|
|
|
47
47
|
"importMeta.d.ts"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@types/chai": "^5.2.
|
|
51
|
-
"@rsbuild/core": "1.
|
|
50
|
+
"@types/chai": "^5.2.3",
|
|
51
|
+
"@rsbuild/core": "1.6.0-beta.1",
|
|
52
52
|
"tinypool": "^1.1.1"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"chai": "^5.3.3",
|
|
56
56
|
"pathe": "^2.0.3",
|
|
57
|
-
"birpc": "2.
|
|
57
|
+
"birpc": "2.6.1",
|
|
58
58
|
"@vitest/expect": "^3.2.4",
|
|
59
59
|
"@vitest/snapshot": "^3.2.4",
|
|
60
60
|
"@babel/code-frame": "^7.27.1",
|
|
61
61
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
62
|
-
"@microsoft/api-extractor": "^7.
|
|
63
|
-
"@rslib/core": "0.
|
|
62
|
+
"@microsoft/api-extractor": "^7.53.2",
|
|
63
|
+
"@rslib/core": "0.16.0",
|
|
64
64
|
"@sinonjs/fake-timers": "^14.0.0",
|
|
65
65
|
"@types/babel__code-frame": "^7.0.6",
|
|
66
66
|
"@types/istanbul-reports": "^3.0.4",
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
"@types/picomatch": "^4.0.2",
|
|
72
72
|
"cac": "^6.7.14",
|
|
73
73
|
"chokidar": "^4.0.3",
|
|
74
|
-
"happy-dom": "^20.0.
|
|
75
|
-
"jest-diff": "^30.
|
|
74
|
+
"happy-dom": "^20.0.8",
|
|
75
|
+
"jest-diff": "^30.2.0",
|
|
76
76
|
"jsdom": "^26.1.0",
|
|
77
77
|
"webpack-license-plugin": "^4.5.1",
|
|
78
78
|
"picocolors": "^1.1.1",
|
|
79
|
-
"rslog": "^1.
|
|
79
|
+
"rslog": "^1.3.0",
|
|
80
80
|
"source-map-support": "^0.5.21",
|
|
81
|
-
"std-env": "^3.
|
|
81
|
+
"std-env": "^3.10.0",
|
|
82
82
|
"stacktrace-parser": "0.1.11",
|
|
83
83
|
"strip-ansi": "^7.1.2",
|
|
84
84
|
"tinyglobby": "^0.2.15",
|
|
85
|
-
"tinyspy": "^4.0.
|
|
85
|
+
"tinyspy": "^4.0.4",
|
|
86
86
|
"picomatch": "^4.0.3",
|
|
87
87
|
"@rstest/tsconfig": "0.0.1"
|
|
88
88
|
},
|