@rspack-canary/test-tools 1.6.2-canary-939d9a81-20251109174505 → 1.6.2-canary-ae75bb5c-20251110081755
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/hash.js +5 -2
- package/dist/case/hot-step.js +3 -2
- package/dist/helper/setup-env.js +0 -4
- package/dist/test/creator.js +2 -2
- package/package.json +2 -2
package/dist/case/hash.js
CHANGED
|
@@ -72,8 +72,11 @@ async function check(env, context, name) {
|
|
|
72
72
|
const stats = compiler.getStats();
|
|
73
73
|
const testConfig = context.getTestConfig();
|
|
74
74
|
if (!stats) {
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
throw new Error("No stats found\n" +
|
|
76
|
+
context
|
|
77
|
+
.getError()
|
|
78
|
+
.map(e => e.stack)
|
|
79
|
+
.join("\n"));
|
|
77
80
|
}
|
|
78
81
|
if (REG_ERROR_CASE.test(name)) {
|
|
79
82
|
env.expect(stats.hasErrors());
|
package/dist/case/hot-step.js
CHANGED
|
@@ -96,8 +96,9 @@ function createHotStepProcessor(name, src, temp, target) {
|
|
|
96
96
|
return str.split(raw).join(replacement);
|
|
97
97
|
}, str);
|
|
98
98
|
};
|
|
99
|
-
const
|
|
100
|
-
|
|
99
|
+
const assets = stats.assets.sort((a, b) => a.name.localeCompare(b.name));
|
|
100
|
+
const fileList = assets
|
|
101
|
+
.map(i => {
|
|
101
102
|
const fileName = i.name;
|
|
102
103
|
const renderName = replaceFileName(fileName);
|
|
103
104
|
const content = replaceContent(fs_extra_1.default.readFileSync(context.getDist(fileName), "utf-8"));
|
package/dist/helper/setup-env.js
CHANGED
|
@@ -18,10 +18,6 @@ if (process.env.RSTEST) {
|
|
|
18
18
|
global.__RSPACK_TEST_TOOLS_PATH__ ??= process.env.__RSPACK_TEST_TOOLS_PATH__;
|
|
19
19
|
global.__DEBUG__ ??= process.env.DEBUG === "test";
|
|
20
20
|
}
|
|
21
|
-
else {
|
|
22
|
-
// Compatible with wasm tests (lazyTestEnv)
|
|
23
|
-
global.rstest = jest;
|
|
24
|
-
}
|
|
25
21
|
if (process.env.ALTERNATIVE_SORT) {
|
|
26
22
|
const oldSort = Array.prototype.sort;
|
|
27
23
|
Array.prototype.sort = function (cmp) {
|
package/dist/test/creator.js
CHANGED
|
@@ -9,7 +9,7 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
9
9
|
const rimraf_1 = require("rimraf");
|
|
10
10
|
const createLazyTestEnv_1 = __importDefault(require("../helper/legacy/createLazyTestEnv"));
|
|
11
11
|
const tester_1 = require("./tester");
|
|
12
|
-
const DEFAULT_MAX_CONCURRENT = 5;
|
|
12
|
+
const DEFAULT_MAX_CONCURRENT = process.env.WASM ? 1 : 5;
|
|
13
13
|
class BasicCaseCreator {
|
|
14
14
|
constructor(_options) {
|
|
15
15
|
this._options = _options;
|
|
@@ -36,7 +36,7 @@ class BasicCaseCreator {
|
|
|
36
36
|
const run = this.shouldRun(name);
|
|
37
37
|
const tester = this.createTester(name, src, dist, temp, testConfig, options);
|
|
38
38
|
const concurrent = process.env.WASM
|
|
39
|
-
?
|
|
39
|
+
? 1
|
|
40
40
|
: testConfig.concurrent || options.concurrent;
|
|
41
41
|
if (options.describe) {
|
|
42
42
|
if (run) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/test-tools",
|
|
3
|
-
"version": "1.6.2-canary-
|
|
3
|
+
"version": "1.6.2-canary-ae75bb5c-20251110081755",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Test tools for rspack",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@types/jsdom": "^21.1.7",
|
|
69
69
|
"typescript": "^5.9.3",
|
|
70
70
|
"wast-loader": "^1.14.1",
|
|
71
|
-
"@rspack/core": "npm:@rspack-canary/core@1.6.2-canary-
|
|
71
|
+
"@rspack/core": "npm:@rspack-canary/core@1.6.2-canary-ae75bb5c-20251110081755"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@rspack/core": ">=1.0.0"
|