@rspack/test-tools 1.4.7-alpha.1 → 1.4.8
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/case/index.d.ts +4 -3
- package/dist/case/index.js +4 -3
- package/dist/case/nativeWatcher.d.ts +1 -0
- package/dist/case/nativeWatcher.js +55 -0
- package/dist/compare/compare.js +1 -1
- package/dist/helper/index.d.ts +2 -2
- package/dist/helper/index.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/plugin/index.d.ts +1 -1
- package/dist/plugin/index.js +1 -1
- package/dist/plugin/lazy-compilation-test-plugin.js +1 -2
- package/dist/plugin/webpack-module-placeholder-plugin.js +0 -1
- package/dist/processor/hook.d.ts +1 -1
- package/dist/processor/hook.js +1 -1
- package/dist/processor/index.d.ts +1 -1
- package/dist/processor/index.js +1 -1
- package/dist/processor/watch.d.ts +2 -1
- package/dist/processor/watch.js +4 -1
- package/dist/runner/index.d.ts +1 -1
- package/dist/runner/index.js +1 -1
- package/dist/runner/runner/web/fake.js +2 -2
- package/dist/runner/runner/web/jsdom.js +1 -1
- package/dist/test/context.d.ts +1 -1
- package/dist/test/creator.d.ts +1 -1
- package/dist/test/creator.js +3 -3
- package/package.json +4 -4
- package/template/editor.worker.js +1 -1
package/dist/case/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./builtin";
|
|
2
|
+
export * from "./cache";
|
|
2
3
|
export * from "./compiler";
|
|
3
4
|
export * from "./config";
|
|
4
5
|
export * from "./defaults";
|
|
@@ -9,11 +10,11 @@ export * from "./hash";
|
|
|
9
10
|
export * from "./hook";
|
|
10
11
|
export * from "./hot";
|
|
11
12
|
export * from "./hot-step";
|
|
13
|
+
export * from "./incremental";
|
|
14
|
+
export * from "./nativeWatcher";
|
|
12
15
|
export * from "./normal";
|
|
16
|
+
export * from "./serial";
|
|
13
17
|
export * from "./stats-api";
|
|
14
18
|
export * from "./stats-output";
|
|
15
19
|
export * from "./treeshaking";
|
|
16
20
|
export * from "./watch";
|
|
17
|
-
export * from "./incremental";
|
|
18
|
-
export * from "./cache";
|
|
19
|
-
export * from "./serial";
|
package/dist/case/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./builtin"), exports);
|
|
18
|
+
__exportStar(require("./cache"), exports);
|
|
18
19
|
__exportStar(require("./compiler"), exports);
|
|
19
20
|
__exportStar(require("./config"), exports);
|
|
20
21
|
__exportStar(require("./defaults"), exports);
|
|
@@ -25,11 +26,11 @@ __exportStar(require("./hash"), exports);
|
|
|
25
26
|
__exportStar(require("./hook"), exports);
|
|
26
27
|
__exportStar(require("./hot"), exports);
|
|
27
28
|
__exportStar(require("./hot-step"), exports);
|
|
29
|
+
__exportStar(require("./incremental"), exports);
|
|
30
|
+
__exportStar(require("./nativeWatcher"), exports);
|
|
28
31
|
__exportStar(require("./normal"), exports);
|
|
32
|
+
__exportStar(require("./serial"), exports);
|
|
29
33
|
__exportStar(require("./stats-api"), exports);
|
|
30
34
|
__exportStar(require("./stats-output"), exports);
|
|
31
35
|
__exportStar(require("./treeshaking"), exports);
|
|
32
36
|
__exportStar(require("./watch"), exports);
|
|
33
|
-
__exportStar(require("./incremental"), exports);
|
|
34
|
-
__exportStar(require("./cache"), exports);
|
|
35
|
-
__exportStar(require("./serial"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createNativeWatcher(name: string, src: string, dist: string, temp: string): void;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.createNativeWatcher = createNativeWatcher;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const watch_1 = require("../processor/watch");
|
|
10
|
+
const runner_1 = require("../runner");
|
|
11
|
+
const creator_1 = require("../test/creator");
|
|
12
|
+
const type_1 = require("../type");
|
|
13
|
+
const creator = new creator_1.BasicCaseCreator({
|
|
14
|
+
clean: true,
|
|
15
|
+
runner: runner_1.WatchRunnerFactory,
|
|
16
|
+
description: (name, index) => {
|
|
17
|
+
return index === 0
|
|
18
|
+
? `${name} should compile`
|
|
19
|
+
: `should compile step ${index}`;
|
|
20
|
+
},
|
|
21
|
+
describe: false,
|
|
22
|
+
steps: ({ name, src, temp }) => {
|
|
23
|
+
const watchState = {};
|
|
24
|
+
const runs = node_fs_1.default
|
|
25
|
+
.readdirSync(src)
|
|
26
|
+
.sort()
|
|
27
|
+
.filter(name => {
|
|
28
|
+
return node_fs_1.default.statSync(node_path_1.default.join(src, name)).isDirectory();
|
|
29
|
+
})
|
|
30
|
+
.map(name => ({ name }));
|
|
31
|
+
return runs.map((run, index) => index === 0
|
|
32
|
+
? new watch_1.WatchProcessor({
|
|
33
|
+
name,
|
|
34
|
+
stepName: run.name,
|
|
35
|
+
tempDir: temp,
|
|
36
|
+
runable: true,
|
|
37
|
+
compilerType: type_1.ECompilerType.Rspack,
|
|
38
|
+
configFiles: ["rspack.config.js", "webpack.config.js"],
|
|
39
|
+
nativeWatcher: true
|
|
40
|
+
}, watchState)
|
|
41
|
+
: new watch_1.WatchStepProcessor({
|
|
42
|
+
name,
|
|
43
|
+
stepName: run.name,
|
|
44
|
+
tempDir: temp,
|
|
45
|
+
runable: true,
|
|
46
|
+
compilerType: type_1.ECompilerType.Rspack,
|
|
47
|
+
configFiles: ["rspack.config.js", "webpack.config.js"]
|
|
48
|
+
}, watchState));
|
|
49
|
+
},
|
|
50
|
+
// TODO: Enable concurrent mode for native watcher
|
|
51
|
+
concurrent: false
|
|
52
|
+
});
|
|
53
|
+
function createNativeWatcher(name, src, dist, temp) {
|
|
54
|
+
creator.create(name, src, dist, temp);
|
|
55
|
+
}
|
package/dist/compare/compare.js
CHANGED
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.compareFile = compareFile;
|
|
7
7
|
exports.compareModules = compareModules;
|
|
8
8
|
exports.compareContent = compareContent;
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
10
|
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
10
11
|
const jest_diff_1 = require("jest-diff");
|
|
11
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
12
12
|
const helper_1 = require("../helper");
|
|
13
13
|
const type_1 = require("../type");
|
|
14
14
|
const format_code_1 = require("./format-code");
|
package/dist/helper/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./directory";
|
|
2
|
+
export * from "./legacy/supportsImportFn";
|
|
2
3
|
export * from "./parse-modules";
|
|
3
4
|
export * from "./read-config-file";
|
|
4
5
|
export * from "./update-snapshot";
|
|
5
|
-
export * from "./win";
|
|
6
6
|
export * from "./util/checkStats";
|
|
7
|
-
export * from "./
|
|
7
|
+
export * from "./win";
|
package/dist/helper/index.js
CHANGED
|
@@ -15,9 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./directory"), exports);
|
|
18
|
+
__exportStar(require("./legacy/supportsImportFn"), exports);
|
|
18
19
|
__exportStar(require("./parse-modules"), exports);
|
|
19
20
|
__exportStar(require("./read-config-file"), exports);
|
|
20
21
|
__exportStar(require("./update-snapshot"), exports);
|
|
21
|
-
__exportStar(require("./win"), exports);
|
|
22
22
|
__exportStar(require("./util/checkStats"), exports);
|
|
23
|
-
__exportStar(require("./
|
|
23
|
+
__exportStar(require("./win"), exports);
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from "./processor";
|
|
|
6
6
|
export * from "./reporter";
|
|
7
7
|
export * from "./runner";
|
|
8
8
|
export * from "./test/context";
|
|
9
|
+
export * from "./test/creator";
|
|
9
10
|
export * from "./test/simple";
|
|
10
11
|
export * from "./test/tester";
|
|
11
|
-
export * from "./test/creator";
|
|
12
12
|
export * from "./type";
|
package/dist/index.js
CHANGED
|
@@ -22,7 +22,7 @@ __exportStar(require("./processor"), exports);
|
|
|
22
22
|
__exportStar(require("./reporter"), exports);
|
|
23
23
|
__exportStar(require("./runner"), exports);
|
|
24
24
|
__exportStar(require("./test/context"), exports);
|
|
25
|
+
__exportStar(require("./test/creator"), exports);
|
|
25
26
|
__exportStar(require("./test/simple"), exports);
|
|
26
27
|
__exportStar(require("./test/tester"), exports);
|
|
27
|
-
__exportStar(require("./test/creator"), exports);
|
|
28
28
|
__exportStar(require("./type"), exports);
|
package/dist/plugin/index.d.ts
CHANGED
package/dist/plugin/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./lazy-compilation-test-plugin"), exports);
|
|
17
18
|
__exportStar(require("./rspack-diff-config-plugin"), exports);
|
|
18
19
|
__exportStar(require("./webpack-diff-config-plugin"), exports);
|
|
19
20
|
__exportStar(require("./webpack-module-placeholder-plugin"), exports);
|
|
20
|
-
__exportStar(require("./lazy-compilation-test-plugin"), exports);
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LazyCompilationTestPlugin = void 0;
|
|
4
4
|
const node_http_1 = require("node:http");
|
|
5
5
|
const core_1 = require("@rspack/core");
|
|
6
|
-
const core_2 = require("@rspack/core");
|
|
7
6
|
class LazyCompilationTestPlugin {
|
|
8
7
|
apply(compiler) {
|
|
9
8
|
let middleware;
|
|
@@ -30,7 +29,7 @@ class LazyCompilationTestPlugin {
|
|
|
30
29
|
else if (compiler.options.experiments.lazyCompilation) {
|
|
31
30
|
compiler.options.experiments.lazyCompilation.serverUrl = urlBase;
|
|
32
31
|
}
|
|
33
|
-
middleware =
|
|
32
|
+
middleware = core_1.experiments.lazyCompilationMiddleware(compiler);
|
|
34
33
|
resolve(null);
|
|
35
34
|
});
|
|
36
35
|
server.on("request", (req, res) => {
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.WebpackModulePlaceholderPlugin = void 0;
|
|
4
4
|
// @ts-nocheck
|
|
5
5
|
const { ConcatSource, RawSource, CachedSource, PrefixSource } = require("webpack-sources");
|
|
6
|
-
const path = require("node:path");
|
|
7
6
|
function createRenderRuntimeModulesFn(Template) {
|
|
8
7
|
return function renderRuntimeModules(runtimeModules, renderContext) {
|
|
9
8
|
const source = new ConcatSource();
|
package/dist/processor/hook.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type TTestContextOptions
|
|
1
|
+
import { TestContext, type TTestContextOptions } from "../test/context";
|
|
2
2
|
import type { ECompilerType, ITestContext, ITestEnv, TCompiler, TCompilerOptions } from "../type";
|
|
3
3
|
import { type ISnapshotProcessorOptions, SnapshotProcessor } from "./snapshot";
|
|
4
4
|
export declare class HookCasesContext extends TestContext {
|
package/dist/processor/hook.js
CHANGED
|
@@ -7,8 +7,8 @@ exports.HookTaskProcessor = exports.HookCasesContext = void 0;
|
|
|
7
7
|
const node_path_1 = __importDefault(require("node:path"));
|
|
8
8
|
const core_1 = require("@rspack/core");
|
|
9
9
|
const jest_snapshot_1 = require("jest-snapshot");
|
|
10
|
-
const pretty_format_1 = require("pretty-format");
|
|
11
10
|
const path_serializer_1 = require("path-serializer");
|
|
11
|
+
const pretty_format_1 = require("pretty-format");
|
|
12
12
|
const context_1 = require("../test/context");
|
|
13
13
|
const snapshot_1 = require("./snapshot");
|
|
14
14
|
const srcDir = node_path_1.default.resolve(__dirname, "../../tests/fixtures");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./basic";
|
|
2
2
|
export * from "./builtin";
|
|
3
|
+
export * from "./cache";
|
|
3
4
|
export * from "./config";
|
|
4
5
|
export * from "./defaults";
|
|
5
6
|
export * from "./diagnostic";
|
|
@@ -17,4 +18,3 @@ export * from "./snapshot";
|
|
|
17
18
|
export * from "./stats";
|
|
18
19
|
export * from "./stats-api";
|
|
19
20
|
export * from "./watch";
|
|
20
|
-
export * from "./cache";
|
package/dist/processor/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./basic"), exports);
|
|
18
18
|
__exportStar(require("./builtin"), exports);
|
|
19
|
+
__exportStar(require("./cache"), exports);
|
|
19
20
|
__exportStar(require("./config"), exports);
|
|
20
21
|
__exportStar(require("./defaults"), exports);
|
|
21
22
|
__exportStar(require("./diagnostic"), exports);
|
|
@@ -33,4 +34,3 @@ __exportStar(require("./snapshot"), exports);
|
|
|
33
34
|
__exportStar(require("./stats"), exports);
|
|
34
35
|
__exportStar(require("./stats-api"), exports);
|
|
35
36
|
__exportStar(require("./watch"), exports);
|
|
36
|
-
__exportStar(require("./cache"), exports);
|
|
@@ -3,6 +3,7 @@ import { type IMultiTaskProcessorOptions, MultiTaskProcessor } from "./multi";
|
|
|
3
3
|
export interface IWatchProcessorOptions<T extends ECompilerType> extends IMultiTaskProcessorOptions<T> {
|
|
4
4
|
stepName: string;
|
|
5
5
|
tempDir: string;
|
|
6
|
+
nativeWatcher?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export declare class WatchProcessor<T extends ECompilerType> extends MultiTaskProcessor<T> {
|
|
8
9
|
protected _watchOptions: IWatchProcessorOptions<T>;
|
|
@@ -15,7 +16,7 @@ export declare class WatchProcessor<T extends ECompilerType> extends MultiTaskPr
|
|
|
15
16
|
run(env: ITestEnv, context: ITestContext): Promise<void>;
|
|
16
17
|
check(env: ITestEnv, context: ITestContext): Promise<void>;
|
|
17
18
|
config(context: ITestContext): Promise<void>;
|
|
18
|
-
static overrideOptions<T extends ECompilerType>({ tempDir,
|
|
19
|
+
static overrideOptions<T extends ECompilerType>({ tempDir, nativeWatcher }: IWatchProcessorOptions<T>): (index: number, context: ITestContext, options: TCompilerOptions<ECompilerType>) => void;
|
|
19
20
|
static findBundle<T extends ECompilerType>(this: IWatchProcessorOptions<T>, index: number, context: ITestContext, options: TCompilerOptions<T>): string | string[];
|
|
20
21
|
}
|
|
21
22
|
export interface IWatchStepProcessorOptions<T extends ECompilerType> extends Omit<IWatchProcessorOptions<T>, "experiments" | "optimization"> {
|
package/dist/processor/watch.js
CHANGED
|
@@ -159,7 +159,7 @@ class WatchProcessor extends multi_1.MultiTaskProcessor {
|
|
|
159
159
|
const compiler = this.getCompiler(context);
|
|
160
160
|
compiler.setOptions(compilerOptions);
|
|
161
161
|
}
|
|
162
|
-
static overrideOptions({ tempDir,
|
|
162
|
+
static overrideOptions({ tempDir, nativeWatcher }) {
|
|
163
163
|
return (index, context, options) => {
|
|
164
164
|
if (!options.mode)
|
|
165
165
|
options.mode = "development";
|
|
@@ -187,6 +187,9 @@ class WatchProcessor extends multi_1.MultiTaskProcessor {
|
|
|
187
187
|
options.optimization ??= {};
|
|
188
188
|
options.experiments ??= {};
|
|
189
189
|
options.experiments.css ??= true;
|
|
190
|
+
if (nativeWatcher) {
|
|
191
|
+
options.experiments.nativeWatcher ??= true;
|
|
192
|
+
}
|
|
190
193
|
options.experiments.rspackFuture ??= {};
|
|
191
194
|
options.experiments.rspackFuture.bundlerInfo ??= {};
|
|
192
195
|
options.experiments.rspackFuture.bundlerInfo.force ??= false;
|
package/dist/runner/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./basic";
|
|
2
|
+
export * from "./cache";
|
|
2
3
|
export * from "./hot";
|
|
3
4
|
export * from "./hot-step";
|
|
4
5
|
export * from "./multiple";
|
|
@@ -6,4 +7,3 @@ export * from "./normal";
|
|
|
6
7
|
export * from "./runner";
|
|
7
8
|
export * from "./type";
|
|
8
9
|
export * from "./watch";
|
|
9
|
-
export * from "./cache";
|
package/dist/runner/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./basic"), exports);
|
|
18
|
+
__exportStar(require("./cache"), exports);
|
|
18
19
|
__exportStar(require("./hot"), exports);
|
|
19
20
|
__exportStar(require("./hot-step"), exports);
|
|
20
21
|
__exportStar(require("./multiple"), exports);
|
|
@@ -22,4 +23,3 @@ __exportStar(require("./normal"), exports);
|
|
|
22
23
|
__exportStar(require("./runner"), exports);
|
|
23
24
|
__exportStar(require("./type"), exports);
|
|
24
25
|
__exportStar(require("./watch"), exports);
|
|
25
|
-
__exportStar(require("./cache"), exports);
|
|
@@ -6,10 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.FakeDocumentWebRunner = void 0;
|
|
7
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
-
const EventSourceForNode_1 = __importDefault(require("../../../helper/legacy/EventSourceForNode"));
|
|
10
|
-
const FakeDocument_1 = __importDefault(require("../../../helper/legacy/FakeDocument"));
|
|
11
9
|
const createFakeWorker_1 = __importDefault(require("../../../helper/legacy/createFakeWorker"));
|
|
12
10
|
const currentScript_1 = __importDefault(require("../../../helper/legacy/currentScript"));
|
|
11
|
+
const EventSourceForNode_1 = __importDefault(require("../../../helper/legacy/EventSourceForNode"));
|
|
12
|
+
const FakeDocument_1 = __importDefault(require("../../../helper/legacy/FakeDocument"));
|
|
13
13
|
const urlToRelativePath_1 = __importDefault(require("../../../helper/legacy/urlToRelativePath"));
|
|
14
14
|
const cjs_1 = require("../cjs");
|
|
15
15
|
class FakeDocumentWebRunner extends cjs_1.CommonJsRunner {
|
|
@@ -8,8 +8,8 @@ const node_fs_1 = __importDefault(require("node:fs"));
|
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const jsdom_1 = require("jsdom");
|
|
10
10
|
const helper_1 = require("../../../helper");
|
|
11
|
-
const EventSourceForNode_1 = __importDefault(require("../../../helper/legacy/EventSourceForNode"));
|
|
12
11
|
const createFakeWorker_1 = __importDefault(require("../../../helper/legacy/createFakeWorker"));
|
|
12
|
+
const EventSourceForNode_1 = __importDefault(require("../../../helper/legacy/EventSourceForNode"));
|
|
13
13
|
const urlToRelativePath_1 = __importDefault(require("../../../helper/legacy/urlToRelativePath"));
|
|
14
14
|
const cjs_1 = require("../cjs");
|
|
15
15
|
// Compatibility code to suppress iconv-lite warnings
|
package/dist/test/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ECompilerType, ITestCompilerManager, ITestContext,
|
|
1
|
+
import type { ECompilerType, ITestCompilerManager, ITestContext, ITesterConfig, ITestRunner, TRunnerFactory, TTestConfig } from "../type";
|
|
2
2
|
export type TTestContextOptions = Omit<ITesterConfig, "name" | "steps">;
|
|
3
3
|
export declare class TestContext implements ITestContext {
|
|
4
4
|
private config;
|
package/dist/test/creator.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ECompilerType, ITestContext, ITestEnv,
|
|
1
|
+
import type { ECompilerType, ITestContext, ITestEnv, ITester, ITestProcessor, TRunnerFactory, TTestConfig } from "../type";
|
|
2
2
|
declare global {
|
|
3
3
|
var testFilter: string | undefined;
|
|
4
4
|
}
|
package/dist/test/creator.js
CHANGED
|
@@ -85,7 +85,7 @@ class BasicCaseCreator {
|
|
|
85
85
|
let stepSignalResolve = null;
|
|
86
86
|
const stepSignal = new Promise((resolve, reject) => {
|
|
87
87
|
stepSignalResolve = resolve;
|
|
88
|
-
}).catch(
|
|
88
|
+
}).catch(() => {
|
|
89
89
|
// prevent unhandled rejection
|
|
90
90
|
});
|
|
91
91
|
const description = typeof this._options.description === "function"
|
|
@@ -118,14 +118,14 @@ class BasicCaseCreator {
|
|
|
118
118
|
stepSignalResolve(e);
|
|
119
119
|
return Promise.reject();
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, () => {
|
|
122
122
|
// bailout
|
|
123
123
|
stepSignalResolve();
|
|
124
124
|
return Promise.reject();
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
chain
|
|
128
|
-
.catch(
|
|
128
|
+
.catch(() => {
|
|
129
129
|
// bailout error
|
|
130
130
|
// prevent unhandled rejection
|
|
131
131
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/test-tools",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Test tools for rspack",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -96,10 +96,10 @@
|
|
|
96
96
|
"typescript": "^5.8.3",
|
|
97
97
|
"wast-loader": "^1.14.1",
|
|
98
98
|
"worker-rspack-loader": "^3.1.2",
|
|
99
|
-
"@rspack/
|
|
100
|
-
"@rspack/
|
|
99
|
+
"@rspack/cli": "1.4.8",
|
|
100
|
+
"@rspack/core": "1.4.8",
|
|
101
101
|
"@rspack/binding-testing": "1.4.1",
|
|
102
|
-
"@rspack/test-tools": "1.4.
|
|
102
|
+
"@rspack/test-tools": "1.4.8"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
105
105
|
"@rspack/core": ">=1.0.0"
|