@rspack/test-tools 2.0.0-rc.3 → 2.0.1
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/esm-output.js +2 -1
- package/dist/compiler.js +6 -1
- package/dist/type.d.ts +1 -0
- package/package.json +6 -6
package/dist/case/esm-output.js
CHANGED
|
@@ -45,7 +45,8 @@ const creator = new creator_1.BasicCaseCreator({
|
|
|
45
45
|
},
|
|
46
46
|
check: async (env, context) => {
|
|
47
47
|
await (0, common_1.check)(env, context, name);
|
|
48
|
-
|
|
48
|
+
const testConfig = context.getTestConfig();
|
|
49
|
+
await (0, common_1.checkSnapshot)(env, context, name, 'esm.snap.txt', testConfig.snapshotFileFilter);
|
|
49
50
|
},
|
|
50
51
|
after: async (context) => {
|
|
51
52
|
await (0, common_1.afterExecute)(context, name);
|
package/dist/compiler.js
CHANGED
|
@@ -204,7 +204,12 @@ class TestCompilerManager {
|
|
|
204
204
|
if (this.compilerInstance) {
|
|
205
205
|
this.compilerInstance.close((e) => {
|
|
206
206
|
this.emitter.emit(ECompilerEvent.Close, e);
|
|
207
|
-
|
|
207
|
+
if (e) {
|
|
208
|
+
reject(e);
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
resolve();
|
|
212
|
+
}
|
|
208
213
|
});
|
|
209
214
|
}
|
|
210
215
|
else {
|
package/dist/type.d.ts
CHANGED
|
@@ -134,6 +134,7 @@ export type TTestConfig = {
|
|
|
134
134
|
timeout?: number;
|
|
135
135
|
concurrent?: boolean;
|
|
136
136
|
snapshotContent?(content: string): string;
|
|
137
|
+
snapshotFileFilter?(file: string): boolean;
|
|
137
138
|
checkSteps?: boolean;
|
|
138
139
|
ignoreNotFriendlyForIncrementalWarnings?: boolean;
|
|
139
140
|
resourceLoader?: (url: string, element: HTMLScriptElement) => Buffer | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/test-tools",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Test tools for rspack",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"@babel/parser": "7.29.2",
|
|
42
42
|
"@babel/traverse": "7.29.0",
|
|
43
43
|
"@babel/types": "7.29.0",
|
|
44
|
+
"chalk": "^4.1.2",
|
|
44
45
|
"cross-env": "^10.1.0",
|
|
45
46
|
"filenamify": "4.3.0",
|
|
46
47
|
"fs-extra": "^11.3.4",
|
|
@@ -55,19 +56,18 @@
|
|
|
55
56
|
"rimraf": "^5.0.10",
|
|
56
57
|
"source-map": "^0.7.6",
|
|
57
58
|
"terser-webpack-plugin": "^5.4.0",
|
|
59
|
+
"wast-loader": "^1.14.1",
|
|
58
60
|
"webpack": "5.104.1",
|
|
59
61
|
"webpack-merge": "6.0.1",
|
|
60
|
-
"webpack-sources": "3.3.4"
|
|
61
|
-
"chalk": "^4.1.2"
|
|
62
|
+
"webpack-sources": "3.3.4"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@types/babel__generator": "7.27.0",
|
|
65
66
|
"@types/babel__traverse": "7.28.0",
|
|
66
67
|
"@types/fs-extra": "11.0.4",
|
|
67
68
|
"@types/jsdom": "^21.1.7",
|
|
68
|
-
"typescript": "^6.0.
|
|
69
|
-
"
|
|
70
|
-
"@rspack/core": "2.0.0-rc.3"
|
|
69
|
+
"typescript": "^6.0.3",
|
|
70
|
+
"@rspack/core": "2.0.1"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"@rspack/core": ">=1.0.0"
|