@rstest/core 0.9.5 → 0.9.6
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 +80 -0
- package/dist/0~8843.js +9 -1
- package/dist/{0~lib.js → 0~@babel/code-frame.js} +2 -2
- package/dist/0~@clack/prompts.js +1044 -0
- package/dist/0~browserLoader.js +1 -1
- package/dist/0~browser~1.js +17 -17
- package/dist/0~checkThresholds.js +1 -1
- package/dist/0~chokidar.js +43 -42
- package/dist/0~fake-timers.js +173 -70
- package/dist/0~generate.js +1 -2
- package/dist/0~magic-string.es.js +1 -181
- package/dist/0~restart.js +1 -1
- package/dist/0~snapshot.js +1 -1
- package/dist/1255.js +11 -11
- package/dist/3145.js +102 -9
- package/dist/4411.js +13 -13
- package/dist/6830.js +1 -1
- package/dist/6887.js +15 -0
- package/dist/9743.js +1 -1
- package/dist/9784.js +2 -2
- package/dist/browser-runtime/2~fake-timers.js +172 -65
- package/dist/browser-runtime/2~magic-string.es.js +3 -189
- package/dist/browser-runtime/2~snapshot.js +2 -2
- package/dist/browser-runtime/723.js +70 -2
- package/dist/browser-runtime/index.d.ts +16 -5
- package/dist/browser.d.ts +16 -5
- package/dist/globalSetupWorker.js +1 -1
- package/dist/index.d.ts +39 -11
- package/dist/index.js +1 -1
- package/dist/worker.d.ts +16 -5
- package/dist/worker.js +1 -1
- package/package.json +11 -11
- package/dist/0~dist.js +0 -1014
- package/dist/4899.js +0 -11
- package/dist/browser-runtime/rslib-runtime.js +0 -49
- /package/dist/{rslib-runtime.js → 0~rslib-runtime.js} +0 -0
|
@@ -1,5 +1,73 @@
|
|
|
1
1
|
/*! LICENSE: 723.js.LICENSE.txt */
|
|
2
|
-
|
|
2
|
+
var __webpack_modules__ = {};
|
|
3
|
+
var __webpack_module_cache__ = {};
|
|
4
|
+
function __webpack_require__(moduleId) {
|
|
5
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
6
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
7
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
8
|
+
exports: {}
|
|
9
|
+
};
|
|
10
|
+
__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
11
|
+
return module.exports;
|
|
12
|
+
}
|
|
13
|
+
__webpack_require__.m = __webpack_modules__;
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.d = (exports, definition)=>{
|
|
16
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: definition[key]
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
})();
|
|
22
|
+
(()=>{
|
|
23
|
+
__webpack_require__.add = function registerModules(modules) {
|
|
24
|
+
Object.assign(__webpack_require__.m, modules);
|
|
25
|
+
};
|
|
26
|
+
})();
|
|
27
|
+
var __webpack_require__temp = __webpack_require__;
|
|
28
|
+
(()=>{
|
|
29
|
+
__webpack_require__.g = (()=>{
|
|
30
|
+
if ('object' == typeof globalThis) return globalThis;
|
|
31
|
+
try {
|
|
32
|
+
return this || new Function('return this')();
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if ('object' == typeof window) return window;
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
})();
|
|
38
|
+
(()=>{
|
|
39
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
40
|
+
})();
|
|
41
|
+
(()=>{
|
|
42
|
+
__webpack_require__.r = (exports)=>{
|
|
43
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
44
|
+
value: 'Module'
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, '__esModule', {
|
|
47
|
+
value: true
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
})();
|
|
51
|
+
(()=>{
|
|
52
|
+
var installedChunks = {
|
|
53
|
+
410: 0,
|
|
54
|
+
723: 0
|
|
55
|
+
};
|
|
56
|
+
var installChunk = (data)=>{
|
|
57
|
+
var __rspack_esm_ids = data.__rspack_esm_ids;
|
|
58
|
+
var __webpack_modules__ = data.__webpack_modules__;
|
|
59
|
+
var __rspack_esm_runtime = data.__rspack_esm_runtime;
|
|
60
|
+
var moduleId, chunkId, i = 0;
|
|
61
|
+
for(moduleId in __webpack_modules__)if (__webpack_require__.o(__webpack_modules__, moduleId)) __webpack_require__.m[moduleId] = __webpack_modules__[moduleId];
|
|
62
|
+
if (__rspack_esm_runtime) __rspack_esm_runtime(__webpack_require__);
|
|
63
|
+
for(; i < __rspack_esm_ids.length; i++){
|
|
64
|
+
chunkId = __rspack_esm_ids[i];
|
|
65
|
+
if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) installedChunks[chunkId][0]();
|
|
66
|
+
installedChunks[__rspack_esm_ids[i]] = 0;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
__webpack_require__.C = installChunk;
|
|
70
|
+
})();
|
|
3
71
|
__webpack_require__.add({
|
|
4
72
|
"../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js" (__unused_rspack_module, exports) {
|
|
5
73
|
exports.byteLength = byteLength;
|
|
@@ -17211,4 +17279,4 @@ const public_rstest = wrapRstestUtilitiesAPI('rstest');
|
|
|
17211
17279
|
const rs = wrapRstestUtilitiesAPI('rs');
|
|
17212
17280
|
const onTestFinished = wrapRstestAPI('onTestFinished');
|
|
17213
17281
|
const onTestFailed = wrapRstestAPI('onTestFailed');
|
|
17214
|
-
export { afterAll, afterEach, beforeAll, beforeEach, createRstestRuntime, diff_namespaceObject, dist_equals, dist_format, dist_namespaceObject, dist_plugins, getTaskNameWithPrefix, globalApis, iterableEquality, onTestFailed, onTestFinished, pathe_M_eThtNZ_resolve, public_assert as assert, public_describe as describe, public_expect as expect, public_it as it, public_rstest as rstest, public_test as test, rs, setRealTimers, subsetEquality };
|
|
17282
|
+
export { __webpack_require__temp as __webpack_require__, afterAll, afterEach, beforeAll, beforeEach, createRstestRuntime, diff_namespaceObject, dist_equals, dist_format, dist_namespaceObject, dist_plugins, getTaskNameWithPrefix, globalApis, iterableEquality, onTestFailed, onTestFinished, pathe_M_eThtNZ_resolve, public_assert as assert, public_describe as describe, public_expect as expect, public_it as it, public_rstest as rstest, public_test as test, rs, setRealTimers, subsetEquality };
|
|
@@ -356,7 +356,7 @@ declare type BrowserViewport = {
|
|
|
356
356
|
height: number;
|
|
357
357
|
} | DevicePreset;
|
|
358
358
|
|
|
359
|
-
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'blob';
|
|
359
|
+
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'json' | 'blob';
|
|
360
360
|
|
|
361
361
|
declare type BuiltinReporterOptions = {
|
|
362
362
|
default: DefaultReporterOptions;
|
|
@@ -364,6 +364,7 @@ declare type BuiltinReporterOptions = {
|
|
|
364
364
|
md: MdReporterOptions;
|
|
365
365
|
'github-actions': Record<string, unknown>;
|
|
366
366
|
junit: Record<string, unknown>;
|
|
367
|
+
json: JsonReporterOptions;
|
|
367
368
|
blob: BlobReporterOptions;
|
|
368
369
|
};
|
|
369
370
|
|
|
@@ -522,11 +523,14 @@ declare type CoverageOptions = {
|
|
|
522
523
|
* This option accepts an array of wax(https://crates.io/crates/wax)-compatible glob patterns
|
|
523
524
|
*
|
|
524
525
|
* @default ['**\/node_modules/**',
|
|
525
|
-
* '**\/dist/**',
|
|
526
526
|
* '**\/test/**',
|
|
527
527
|
* '**\/__tests__/**',
|
|
528
|
-
* '
|
|
529
|
-
* '
|
|
528
|
+
* '**\/__mocks__/**',
|
|
529
|
+
* '**\/*.d.ts',
|
|
530
|
+
* '**\/*.{test,spec}.[jt]s',
|
|
531
|
+
* '**\/*.{test,spec}.[cm][jt]s',
|
|
532
|
+
* '**\/*.{test,spec}.[jt]sx',
|
|
533
|
+
* '**\/*.{test,spec}.[cm][jt]sx'
|
|
530
534
|
* ]
|
|
531
535
|
*/
|
|
532
536
|
exclude?: string[];
|
|
@@ -1432,6 +1436,13 @@ declare interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomM
|
|
|
1432
1436
|
|
|
1433
1437
|
declare type JsonOptions = FileOptions;
|
|
1434
1438
|
|
|
1439
|
+
declare type JsonReporterOptions = {
|
|
1440
|
+
/**
|
|
1441
|
+
* Write report JSON to a file instead of stdout.
|
|
1442
|
+
*/
|
|
1443
|
+
outputPath?: string;
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1435
1446
|
declare type JsonSummaryOptions = FileOptions;
|
|
1436
1447
|
|
|
1437
1448
|
declare interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
|
@@ -2338,7 +2349,7 @@ declare interface RstestConfig {
|
|
|
2338
2349
|
*/
|
|
2339
2350
|
includeTaskLocation?: boolean;
|
|
2340
2351
|
plugins?: RsbuildConfig['plugins'];
|
|
2341
|
-
source?: Pick<NonNullable<RsbuildConfig['source']>, 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude'>;
|
|
2352
|
+
source?: Pick<NonNullable<RsbuildConfig['source']>, 'assetsInclude' | 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude' | 'transformImport' | 'assetsInclude'>;
|
|
2342
2353
|
dev?: Pick<NonNullable<RsbuildConfig['dev']>, 'writeToDisk'>;
|
|
2343
2354
|
output?: RstestOutputConfig;
|
|
2344
2355
|
resolve?: RsbuildConfig['resolve'];
|
package/dist/browser.d.ts
CHANGED
|
@@ -408,7 +408,7 @@ declare type BrowserViewport = {
|
|
|
408
408
|
height: number;
|
|
409
409
|
} | DevicePreset;
|
|
410
410
|
|
|
411
|
-
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'blob';
|
|
411
|
+
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'json' | 'blob';
|
|
412
412
|
|
|
413
413
|
declare type BuiltinReporterOptions = {
|
|
414
414
|
default: DefaultReporterOptions;
|
|
@@ -416,6 +416,7 @@ declare type BuiltinReporterOptions = {
|
|
|
416
416
|
md: MdReporterOptions;
|
|
417
417
|
'github-actions': Record<string, unknown>;
|
|
418
418
|
junit: Record<string, unknown>;
|
|
419
|
+
json: JsonReporterOptions;
|
|
419
420
|
blob: BlobReporterOptions;
|
|
420
421
|
};
|
|
421
422
|
|
|
@@ -591,11 +592,14 @@ declare type CoverageOptions = {
|
|
|
591
592
|
* This option accepts an array of wax(https://crates.io/crates/wax)-compatible glob patterns
|
|
592
593
|
*
|
|
593
594
|
* @default ['**\/node_modules/**',
|
|
594
|
-
* '**\/dist/**',
|
|
595
595
|
* '**\/test/**',
|
|
596
596
|
* '**\/__tests__/**',
|
|
597
|
-
* '
|
|
598
|
-
* '
|
|
597
|
+
* '**\/__mocks__/**',
|
|
598
|
+
* '**\/*.d.ts',
|
|
599
|
+
* '**\/*.{test,spec}.[jt]s',
|
|
600
|
+
* '**\/*.{test,spec}.[cm][jt]s',
|
|
601
|
+
* '**\/*.{test,spec}.[jt]sx',
|
|
602
|
+
* '**\/*.{test,spec}.[cm][jt]sx'
|
|
599
603
|
* ]
|
|
600
604
|
*/
|
|
601
605
|
exclude?: string[];
|
|
@@ -1551,6 +1555,13 @@ declare interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomM
|
|
|
1551
1555
|
|
|
1552
1556
|
declare type JsonOptions = FileOptions;
|
|
1553
1557
|
|
|
1558
|
+
declare type JsonReporterOptions = {
|
|
1559
|
+
/**
|
|
1560
|
+
* Write report JSON to a file instead of stdout.
|
|
1561
|
+
*/
|
|
1562
|
+
outputPath?: string;
|
|
1563
|
+
};
|
|
1564
|
+
|
|
1554
1565
|
declare type JsonSummaryOptions = FileOptions;
|
|
1555
1566
|
|
|
1556
1567
|
declare interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
|
@@ -2813,7 +2824,7 @@ declare interface RstestConfig {
|
|
|
2813
2824
|
*/
|
|
2814
2825
|
includeTaskLocation?: boolean;
|
|
2815
2826
|
plugins?: RsbuildConfig['plugins'];
|
|
2816
|
-
source?: Pick<NonNullable<RsbuildConfig['source']>, 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude'>;
|
|
2827
|
+
source?: Pick<NonNullable<RsbuildConfig['source']>, 'assetsInclude' | 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude' | 'transformImport' | 'assetsInclude'>;
|
|
2817
2828
|
dev?: Pick<NonNullable<RsbuildConfig['dev']>, 'writeToDisk'>;
|
|
2818
2829
|
output?: RstestOutputConfig;
|
|
2819
2830
|
resolve?: RsbuildConfig['resolve'];
|
package/dist/index.d.ts
CHANGED
|
@@ -339,7 +339,7 @@ declare type BrowserViewport = {
|
|
|
339
339
|
height: number;
|
|
340
340
|
} | DevicePreset;
|
|
341
341
|
|
|
342
|
-
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'blob';
|
|
342
|
+
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'json' | 'blob';
|
|
343
343
|
|
|
344
344
|
declare type BuiltinReporterOptions = {
|
|
345
345
|
default: DefaultReporterOptions;
|
|
@@ -347,6 +347,7 @@ declare type BuiltinReporterOptions = {
|
|
|
347
347
|
md: MdReporterOptions;
|
|
348
348
|
'github-actions': Record<string, unknown>;
|
|
349
349
|
junit: Record<string, unknown>;
|
|
350
|
+
json: JsonReporterOptions;
|
|
350
351
|
blob: BlobReporterOptions;
|
|
351
352
|
};
|
|
352
353
|
|
|
@@ -582,11 +583,14 @@ export declare type CoverageOptions = {
|
|
|
582
583
|
* This option accepts an array of wax(https://crates.io/crates/wax)-compatible glob patterns
|
|
583
584
|
*
|
|
584
585
|
* @default ['**\/node_modules/**',
|
|
585
|
-
* '**\/dist/**',
|
|
586
586
|
* '**\/test/**',
|
|
587
587
|
* '**\/__tests__/**',
|
|
588
|
-
* '
|
|
589
|
-
* '
|
|
588
|
+
* '**\/__mocks__/**',
|
|
589
|
+
* '**\/*.d.ts',
|
|
590
|
+
* '**\/*.{test,spec}.[jt]s',
|
|
591
|
+
* '**\/*.{test,spec}.[cm][jt]s',
|
|
592
|
+
* '**\/*.{test,spec}.[jt]sx',
|
|
593
|
+
* '**\/*.{test,spec}.[cm][jt]sx'
|
|
590
594
|
* ]
|
|
591
595
|
*/
|
|
592
596
|
exclude?: string[];
|
|
@@ -789,15 +793,26 @@ export declare function defineConfig(config: RstestConfigAsyncFn): RstestConfigA
|
|
|
789
793
|
export declare function defineConfig(config: RstestConfigExport): RstestConfigExport;
|
|
790
794
|
|
|
791
795
|
/**
|
|
792
|
-
* This function helps you to autocomplete configuration types.
|
|
793
|
-
|
|
796
|
+
* This function helps you to autocomplete inline project configuration types.
|
|
797
|
+
*/
|
|
798
|
+
export declare function defineInlineProject(config: InlineProjectConfig): InlineProjectConfig;
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* This function helps you to autocomplete project configuration types.
|
|
802
|
+
* It accepts an inline or nested Rstest project config object, or a function that returns one.
|
|
794
803
|
*/
|
|
795
|
-
export declare function defineProject(config:
|
|
804
|
+
export declare function defineProject(config: ExportedProjectConfig): ExportedProjectConfig;
|
|
805
|
+
|
|
806
|
+
export declare function defineProject(config: NestedProjectConfig): NestedProjectConfig;
|
|
796
807
|
|
|
797
808
|
export declare function defineProject(config: ProjectConfigSyncFn): ProjectConfigSyncFn;
|
|
798
809
|
|
|
810
|
+
export declare function defineProject(config: NestedProjectConfigSyncFn): NestedProjectConfigSyncFn;
|
|
811
|
+
|
|
799
812
|
export declare function defineProject(config: ProjectConfigAsyncFn): ProjectConfigAsyncFn;
|
|
800
813
|
|
|
814
|
+
export declare function defineProject(config: NestedProjectConfigAsyncFn): NestedProjectConfigAsyncFn;
|
|
815
|
+
|
|
801
816
|
export declare type Describe = DescribeFn & {
|
|
802
817
|
each: DescribeEachFn;
|
|
803
818
|
for: DescribeForFn;
|
|
@@ -943,6 +958,8 @@ declare interface ExpectStatic_2 extends Chai.ExpectStatic, Matchers, Asymmetric
|
|
|
943
958
|
not: AsymmetricMatchersContaining;
|
|
944
959
|
}
|
|
945
960
|
|
|
961
|
+
declare type ExportedProjectConfig = ProjectConfig;
|
|
962
|
+
|
|
946
963
|
export declare type ExtendConfig = Omit<LooseRstestConfig, 'projects'>;
|
|
947
964
|
|
|
948
965
|
export declare type ExtendConfigFn = (userConfig: Readonly<LooseRstestConfig>) => MaybePromise<ExtendConfig>;
|
|
@@ -1551,6 +1568,13 @@ declare interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomM
|
|
|
1551
1568
|
|
|
1552
1569
|
declare type JsonOptions = FileOptions;
|
|
1553
1570
|
|
|
1571
|
+
declare type JsonReporterOptions = {
|
|
1572
|
+
/**
|
|
1573
|
+
* Write report JSON to a file instead of stdout.
|
|
1574
|
+
*/
|
|
1575
|
+
outputPath?: string;
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1554
1578
|
declare type JsonSummaryOptions = FileOptions;
|
|
1555
1579
|
|
|
1556
1580
|
declare interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
|
@@ -2262,9 +2286,13 @@ declare interface MockSettledResultRejected_2 {
|
|
|
2262
2286
|
declare type NamesIndex = number;
|
|
2263
2287
|
|
|
2264
2288
|
declare type NestedProjectConfig = {
|
|
2265
|
-
projects: (
|
|
2289
|
+
projects: (InlineProjectConfig | string)[];
|
|
2266
2290
|
};
|
|
2267
2291
|
|
|
2292
|
+
declare type NestedProjectConfigAsyncFn = () => Promise<NestedProjectConfig>;
|
|
2293
|
+
|
|
2294
|
+
declare type NestedProjectConfigSyncFn = () => NestedProjectConfig;
|
|
2295
|
+
|
|
2268
2296
|
declare interface NewPlugin {
|
|
2269
2297
|
serialize: (val: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer) => string;
|
|
2270
2298
|
test: Test;
|
|
@@ -2405,9 +2433,9 @@ export declare type ProjectConfig = Omit<RstestConfig, 'projects' | 'reporters'
|
|
|
2405
2433
|
output?: Omit<RstestOutputConfig, 'distPath'>;
|
|
2406
2434
|
};
|
|
2407
2435
|
|
|
2408
|
-
declare type ProjectConfigAsyncFn = () => Promise<
|
|
2436
|
+
declare type ProjectConfigAsyncFn = () => Promise<ExportedProjectConfig>;
|
|
2409
2437
|
|
|
2410
|
-
declare type ProjectConfigSyncFn = () =>
|
|
2438
|
+
declare type ProjectConfigSyncFn = () => ExportedProjectConfig;
|
|
2411
2439
|
|
|
2412
2440
|
declare type ProjectContext = {
|
|
2413
2441
|
name: string;
|
|
@@ -2794,7 +2822,7 @@ export declare interface RstestConfig {
|
|
|
2794
2822
|
*/
|
|
2795
2823
|
includeTaskLocation?: boolean;
|
|
2796
2824
|
plugins?: RsbuildConfig['plugins'];
|
|
2797
|
-
source?: Pick<NonNullable<RsbuildConfig['source']>, 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude'>;
|
|
2825
|
+
source?: Pick<NonNullable<RsbuildConfig['source']>, 'assetsInclude' | 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude' | 'transformImport' | 'assetsInclude'>;
|
|
2798
2826
|
dev?: Pick<NonNullable<RsbuildConfig['dev']>, 'writeToDisk'>;
|
|
2799
2827
|
output?: RstestOutputConfig;
|
|
2800
2828
|
resolve?: RsbuildConfig['resolve'];
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
export { afterAll, afterEach, assert, beforeAll, beforeEach, describe, expect, it, onTestFailed, onTestFinished, rs, rstest, test } from "./5040.js";
|
|
3
|
-
export { createRstest, defineConfig, defineProject, initCli, loadConfig, mergeProjectConfig, mergeRstestConfig, runCLI } from "./3145.js";
|
|
3
|
+
export { createRstest, defineConfig, defineInlineProject, defineProject, initCli, loadConfig, mergeProjectConfig, mergeRstestConfig, runCLI } from "./3145.js";
|
package/dist/worker.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ declare type BrowserViewport = {
|
|
|
83
83
|
height: number;
|
|
84
84
|
} | DevicePreset;
|
|
85
85
|
|
|
86
|
-
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'blob';
|
|
86
|
+
declare type BuiltInReporterNames = 'default' | 'verbose' | 'md' | 'github-actions' | 'junit' | 'json' | 'blob';
|
|
87
87
|
|
|
88
88
|
declare type BuiltinReporterOptions = {
|
|
89
89
|
default: DefaultReporterOptions;
|
|
@@ -91,6 +91,7 @@ declare type BuiltinReporterOptions = {
|
|
|
91
91
|
md: MdReporterOptions;
|
|
92
92
|
'github-actions': Record<string, unknown>;
|
|
93
93
|
junit: Record<string, unknown>;
|
|
94
|
+
json: JsonReporterOptions;
|
|
94
95
|
blob: BlobReporterOptions;
|
|
95
96
|
};
|
|
96
97
|
|
|
@@ -220,11 +221,14 @@ declare type CoverageOptions = {
|
|
|
220
221
|
* This option accepts an array of wax(https://crates.io/crates/wax)-compatible glob patterns
|
|
221
222
|
*
|
|
222
223
|
* @default ['**\/node_modules/**',
|
|
223
|
-
* '**\/dist/**',
|
|
224
224
|
* '**\/test/**',
|
|
225
225
|
* '**\/__tests__/**',
|
|
226
|
-
* '
|
|
227
|
-
* '
|
|
226
|
+
* '**\/__mocks__/**',
|
|
227
|
+
* '**\/*.d.ts',
|
|
228
|
+
* '**\/*.{test,spec}.[jt]s',
|
|
229
|
+
* '**\/*.{test,spec}.[cm][jt]s',
|
|
230
|
+
* '**\/*.{test,spec}.[jt]sx',
|
|
231
|
+
* '**\/*.{test,spec}.[cm][jt]sx'
|
|
228
232
|
* ]
|
|
229
233
|
*/
|
|
230
234
|
exclude?: string[];
|
|
@@ -449,6 +453,13 @@ declare type InlineProjectConfig = ProjectConfig & {
|
|
|
449
453
|
|
|
450
454
|
declare type JsonOptions = FileOptions;
|
|
451
455
|
|
|
456
|
+
declare type JsonReporterOptions = {
|
|
457
|
+
/**
|
|
458
|
+
* Write report JSON to a file instead of stdout.
|
|
459
|
+
*/
|
|
460
|
+
outputPath?: string;
|
|
461
|
+
};
|
|
462
|
+
|
|
452
463
|
declare type JsonSummaryOptions = FileOptions;
|
|
453
464
|
|
|
454
465
|
declare interface LcovOnlyOptions extends FileOptions, ProjectOptions {}
|
|
@@ -1025,7 +1036,7 @@ declare interface RstestConfig {
|
|
|
1025
1036
|
*/
|
|
1026
1037
|
includeTaskLocation?: boolean;
|
|
1027
1038
|
plugins?: RsbuildConfig['plugins'];
|
|
1028
|
-
source?: Pick<NonNullable<RsbuildConfig['source']>, 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude'>;
|
|
1039
|
+
source?: Pick<NonNullable<RsbuildConfig['source']>, 'assetsInclude' | 'define' | 'tsconfigPath' | 'decorators' | 'include' | 'exclude' | 'transformImport' | 'assetsInclude'>;
|
|
1029
1040
|
dev?: Pick<NonNullable<RsbuildConfig['dev']>, 'writeToDisk'>;
|
|
1030
1041
|
output?: RstestOutputConfig;
|
|
1031
1042
|
resolve?: RsbuildConfig['resolve'];
|
package/dist/worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { __webpack_require__ } from "./rslib-runtime.js";
|
|
2
|
+
import { __webpack_require__ } from "./0~rslib-runtime.js";
|
|
3
3
|
import { existsSync, promises } from "node:fs";
|
|
4
4
|
import "./1255.js";
|
|
5
5
|
import { createWorkerMetaMessage, createBirpc } from "./1983.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstest/core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.6",
|
|
4
4
|
"description": "The Rsbuild-based test tool.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rstest",
|
|
@@ -54,20 +54,20 @@
|
|
|
54
54
|
"importMeta.d.ts"
|
|
55
55
|
],
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@rsbuild/core": "2.0.0-
|
|
57
|
+
"@rsbuild/core": "2.0.0-rc.0",
|
|
58
58
|
"@types/chai": "^5.2.3",
|
|
59
59
|
"tinypool": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@babel/code-frame": "^7.29.0",
|
|
63
|
-
"@clack/prompts": "^1.
|
|
63
|
+
"@clack/prompts": "^1.2.0",
|
|
64
64
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
65
|
-
"@microsoft/api-extractor": "^7.57.
|
|
65
|
+
"@microsoft/api-extractor": "^7.57.8",
|
|
66
66
|
"@rsbuild/plugin-less": "^1.6.2",
|
|
67
67
|
"@rsbuild/plugin-node-polyfill": "^1.4.4",
|
|
68
68
|
"@rsbuild/plugin-sass": "^1.5.1",
|
|
69
|
-
"@rslib/core": "0.20.
|
|
70
|
-
"@sinonjs/fake-timers": "^15.
|
|
69
|
+
"@rslib/core": "0.20.2",
|
|
70
|
+
"@sinonjs/fake-timers": "^15.2.0",
|
|
71
71
|
"@types/babel__code-frame": "^7.27.0",
|
|
72
72
|
"@types/istanbul-lib-coverage": "^2.0.6",
|
|
73
73
|
"@types/istanbul-lib-report": "^3.0.3",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/picomatch": "^4.0.2",
|
|
77
77
|
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
78
78
|
"@types/source-map-support": "^0.5.10",
|
|
79
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
79
|
+
"@typescript/native-preview": "7.0.0-dev.20260331.1",
|
|
80
80
|
"@vitest/expect": "^3.2.4",
|
|
81
81
|
"@vitest/pretty-format": "^3.2.4",
|
|
82
82
|
"@vitest/snapshot": "^3.2.4",
|
|
@@ -85,14 +85,14 @@
|
|
|
85
85
|
"cac": "^7.0.0",
|
|
86
86
|
"chai": "^6.2.2",
|
|
87
87
|
"chokidar": "^5.0.0",
|
|
88
|
-
"happy-dom": "^20.8.
|
|
89
|
-
"jsdom": "^
|
|
88
|
+
"happy-dom": "^20.8.9",
|
|
89
|
+
"jsdom": "^29.0.1",
|
|
90
90
|
"memfs": "^4.57.1",
|
|
91
91
|
"package-manager-detector": "^1.6.0",
|
|
92
92
|
"pathe": "^2.0.3",
|
|
93
93
|
"picocolors": "^1.1.1",
|
|
94
94
|
"picomatch": "^4.0.4",
|
|
95
|
-
"rslog": "^2.1.
|
|
95
|
+
"rslog": "^2.1.1",
|
|
96
96
|
"source-map-support": "^0.5.21",
|
|
97
97
|
"stacktrace-parser": "0.1.11",
|
|
98
98
|
"std-env": "^4.0.0",
|
|
@@ -127,6 +127,6 @@
|
|
|
127
127
|
"build": "rslib build && npx prettier ./LICENSE.md --write",
|
|
128
128
|
"dev": "cross-env SOURCEMAP=true rslib build --watch",
|
|
129
129
|
"test": "npx rstest --globals",
|
|
130
|
-
"typecheck": "tsc --noEmit"
|
|
130
|
+
"typecheck": "pnpm -w exec tsc --noEmit -p packages/core/tsconfig.json"
|
|
131
131
|
}
|
|
132
132
|
}
|