@@ -7,10 +7,39 @@ const setupFilesAfterEnv = [
77 "@rspack/test-tools/setup-expect" ,
88] ;
99
10+ const wasmConfig = process . env . WASM && defineConfig ( {
11+ setupFiles : [ ...setupFilesAfterEnv , "@rspack/test-tools/setup-wasm" ] ,
12+ exclude : [
13+ // Skip because they rely on snapshots
14+ "Diagnostics.test.js" ,
15+ "Error.test.js" ,
16+ "StatsAPI.test.js" ,
17+ "StatsOutput.test.js" ,
18+ // Skip because the loader can not be loaded in CI
19+ "Hot*.test.js" ,
20+
21+ // Skip temporarily and should investigate in the future
22+ "Cache.test.js" ,
23+ "Compiler.test.js" ,
24+ "MultiCompiler.test.js" ,
25+ "Serial.test.js" ,
26+ "Defaults.test.js" ,
27+ "Example.test.js" ,
28+ "Incremental-*.test.js" ,
29+ "NativeWatcher*.test.js" ,
30+ ] ,
31+ maxConcurrency : 1 ,
32+ pool : {
33+ maxWorkers : 1 ,
34+ execArgv : [ '--no-warnings' , '--expose-gc' , '--max-old-space-size=6144' , '--experimental-vm-modules' ] ,
35+ }
36+ } ) ;
37+
38+
1039export default defineConfig ( {
1140 setupFiles : setupFilesAfterEnv ,
1241 testTimeout : process . env . CI ? 60000 : 30000 ,
13- include : process . env . WASM ? [ ] : [
42+ include : [
1443 "*.test.js" ,
1544 ] ,
1645 slowTestThreshold : 5000 ,
@@ -25,6 +54,7 @@ export default defineConfig({
2554 source : {
2655 exclude : [ root ] ,
2756 } ,
57+ disableConsoleIntercept : true ,
2858 globals : true ,
2959 output : {
3060 externals : [ / .* / ] ,
@@ -62,5 +92,6 @@ export default defineConfig({
6292 __DEBUG__ : process . env . DEBUG === "test" ? 'true' : 'false' ,
6393 } ,
6494 hideSkippedTests : true ,
95+ ...( wasmConfig || { } ) ,
6596} ) ;
6697
0 commit comments