@@ -4,14 +4,17 @@ import { run } from "../../utils/test-utils";
44
55describe ( "rspack cli" , ( ) => {
66 describe ( "should config not found" , ( ) => {
7- it ( "should throw an error when config file does not found" , async ( ) => {
8- const { stderr } = await run ( __dirname , [ "-c" , "not-found-config.js" ] ) ;
9- expect ( stderr ) . toMatch ( / n o t f o u n d / ) ;
10- } ) ;
7+ it . concurrent (
8+ "should throw an error when config file does not found" ,
9+ async ( ) => {
10+ const { stderr } = await run ( __dirname , [ "-c" , "not-found-config.js" ] ) ;
11+ expect ( stderr ) . toMatch ( / n o t f o u n d / ) ;
12+ }
13+ ) ;
1114 } ) ;
1215 describe ( "should respect cjs in esm folder" , ( ) => {
1316 const cwd = resolve ( __dirname , "./cjs_in_esm" ) ;
14- it ( "should load config.cjs file" , async ( ) => {
17+ it . concurrent ( "should load config.cjs file" , async ( ) => {
1518 const { exitCode, stderr, stdout } = await run ( cwd , [
1619 "-c" ,
1720 "rspack.config.cjs"
@@ -24,7 +27,7 @@ describe("rspack cli", () => {
2427 ) . resolves . toMatch ( / M a i n c j s f i l e / ) ;
2528 } ) ;
2629
27- it ( "should load config.cts file" , async ( ) => {
30+ it . concurrent ( "should load config.cts file" , async ( ) => {
2831 const { exitCode, stderr, stdout } = await run ( cwd , [
2932 "-c" ,
3033 "rspack.config.cts"
@@ -40,7 +43,7 @@ describe("rspack cli", () => {
4043 describe ( "should load cjs config" , ( ) => {
4144 const cwd = resolve ( __dirname , "./cjs" ) ;
4245
43- it ( "should load default config.js file" , async ( ) => {
46+ it . concurrent ( "should load default config.js file" , async ( ) => {
4447 const { exitCode, stderr, stdout } = await run ( cwd , [ ] ) ;
4548 expect ( stderr ) . toBeFalsy ( ) ;
4649 expect ( stdout ) . toBeTruthy ( ) ;
@@ -50,7 +53,7 @@ describe("rspack cli", () => {
5053 ) . resolves . toMatch ( / M a i n c j s f i l e / ) ;
5154 } ) ;
5255
53- it ( "should load config.ts file" , async ( ) => {
56+ it . concurrent ( "should load config.ts file" , async ( ) => {
5457 const { exitCode, stderr, stdout } = await run ( cwd , [
5558 "-c" ,
5659 "rspack.config.ts"
@@ -62,7 +65,7 @@ describe("rspack cli", () => {
6265 readFile ( resolve ( cwd , "./dist/ts.bundle.js" ) , { encoding : "utf-8" } )
6366 ) . resolves . toMatch ( / M a i n c j s f i l e / ) ;
6467 } ) ;
65- it ( "should load config.export.ts file" , async ( ) => {
68+ it . concurrent ( "should load config.export.ts file" , async ( ) => {
6669 const { exitCode, stderr, stdout } = await run ( cwd , [
6770 "-c" ,
6871 "rspack.config.export.ts"
@@ -75,7 +78,7 @@ describe("rspack cli", () => {
7578 ) . resolves . toMatch ( / M a i n c j s f i l e / ) ;
7679 } ) ;
7780
78- it ( "should load config.cjs file" , async ( ) => {
81+ it . concurrent ( "should load config.cjs file" , async ( ) => {
7982 const { exitCode, stderr, stdout } = await run ( cwd , [
8083 "-c" ,
8184 "rspack.config.cjs"
@@ -88,7 +91,7 @@ describe("rspack cli", () => {
8891 ) . resolves . toMatch ( / M a i n c j s f i l e / ) ;
8992 } ) ;
9093
91- it ( "should load config.cts file" , async ( ) => {
94+ it . concurrent ( "should load config.cts file" , async ( ) => {
9295 const { exitCode, stderr, stdout } = await run ( cwd , [
9396 "-c" ,
9497 "rspack.config.cts"
@@ -105,7 +108,7 @@ describe("rspack cli", () => {
105108 describe ( "should load esm config" , ( ) => {
106109 const cwd = resolve ( __dirname , "./esm" ) ;
107110
108- it ( "should load default config.js file" , async ( ) => {
111+ it . concurrent ( "should load default config.js file" , async ( ) => {
109112 const { exitCode, stderr, stdout } = await run ( cwd , [ ] ) ;
110113 expect ( stderr ) . toBeFalsy ( ) ;
111114 expect ( stdout ) . toBeTruthy ( ) ;
@@ -115,7 +118,7 @@ describe("rspack cli", () => {
115118 ) . resolves . toMatch ( / M a i n e s m f i l e / ) ;
116119 } ) ;
117120
118- it ( "should load config.ts file" , async ( ) => {
121+ it . concurrent ( "should load config.ts file" , async ( ) => {
119122 const { exitCode, stdout } = await run ( cwd , [ "-c" , "rspack.config.ts" ] , {
120123 nodeOptions : [ "--experimental-loader=ts-node/esm" ]
121124 } ) ;
@@ -126,7 +129,7 @@ describe("rspack cli", () => {
126129 ) . resolves . toMatch ( / M a i n e s m f i l e / ) ;
127130 } ) ;
128131
129- it ( "should load config.mjs file" , async ( ) => {
132+ it . concurrent ( "should load config.mjs file" , async ( ) => {
130133 const { exitCode, stderr, stdout } = await run ( cwd , [
131134 "-c" ,
132135 "rspack.config.mjs"
@@ -139,7 +142,7 @@ describe("rspack cli", () => {
139142 ) . resolves . toMatch ( / M a i n e s m f i l e / ) ;
140143 } ) ;
141144
142- it ( "should load config.mts file" , async ( ) => {
145+ it . concurrent ( "should load config.mts file" , async ( ) => {
143146 const { exitCode, stdout } = await run ( cwd , [ "-c" , "rspack.config.mts" ] , {
144147 nodeOptions : [ "--experimental-loader=ts-node/esm" ]
145148 } ) ;
@@ -155,7 +158,7 @@ describe("rspack cli", () => {
155158 describe ( "should load config with defineConfig helper" , ( ) => {
156159 const cwd = resolve ( __dirname , "./esm" ) ;
157160
158- it ( "should load config.ts file" , async ( ) => {
161+ it . concurrent ( "should load config.ts file" , async ( ) => {
159162 const { exitCode, stdout } = await run ( cwd , [ "-c" , "rspack.config.ts" ] , {
160163 nodeOptions : [ "--experimental-loader=ts-node/esm" ]
161164 } ) ;
@@ -166,7 +169,7 @@ describe("rspack cli", () => {
166169 ) . resolves . toMatch ( / M a i n e s m f i l e / ) ;
167170 } ) ;
168171
169- it ( "should load config.mts file" , async ( ) => {
172+ it . concurrent ( "should load config.mts file" , async ( ) => {
170173 const { exitCode, stdout } = await run ( cwd , [ "-c" , "rspack.config.mts" ] , {
171174 nodeOptions : [ "--experimental-loader=ts-node/esm" ]
172175 } ) ;
@@ -181,7 +184,7 @@ describe("rspack cli", () => {
181184
182185 describe ( "should load monorepo config" , ( ) => {
183186 const cwd = resolve ( __dirname , "./monorepo" ) ;
184- it ( "should load monorepo config.ts file" , async ( ) => {
187+ it . concurrent ( "should load monorepo config.ts file" , async ( ) => {
185188 const { exitCode, stdout } = await run ( cwd , [ "-c" , "rspack.config.ts" ] , {
186189 nodeOptions : [ "--experimental-loader=ts-node/esm" ]
187190 } ) ;
@@ -198,7 +201,7 @@ describe("rspack cli", () => {
198201
199202 // describe("loose-unrecognized-keys (default)", () => {
200203 // const cwd = resolve(__dirname, "./loose-unrecognized-keys");
201- // it("should report unrecognized keys", async () => {
204+ // it.concurrent ("should report unrecognized keys", async () => {
202205 // const { stderr, exitCode } = await run(cwd, []);
203206 // expect(stderr).toMatchInlineSnapshot(`
204207 // "Configuration error:
@@ -211,7 +214,7 @@ describe("rspack cli", () => {
211214
212215 // describe("loose-unrecognized-keys 2 (default)", () => {
213216 // const cwd = resolve(__dirname, "./loose-unrecognized-keys-other-error");
214- // it("should fail on other error", async () => {
217+ // it.concurrent ("should fail on other error", async () => {
215218 // const { stderr, exitCode } = await run(cwd, []);
216219 // expect(stderr).toMatch("ValidationError");
217220 // expect(stderr).toMatch(
0 commit comments