Skip to content

Commit 6f5f893

Browse files
committed
feat: update test snap && fix test case
1 parent 8bc6f20 commit 6f5f893

File tree

9 files changed

+95
-77
lines changed

9 files changed

+95
-77
lines changed

packages/cli/babel-preset/tests/__snapshots__/node.test.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ exports[`should allow to enable legacy decorator 1`] = `
2929
"include": [
3030
"@babel/plugin-transform-class-properties",
3131
],
32-
"modules": false,
32+
"modules": "commonjs",
3333
"targets": [
3434
"node >= 20",
3535
],
@@ -69,7 +69,7 @@ exports[`should allow to override target node version 1`] = `
6969
"exclude": [
7070
"transform-typeof-symbol",
7171
],
72-
"modules": false,
72+
"modules": "commonjs",
7373
"targets": [
7474
"node >= 20",
7575
],
@@ -109,7 +109,7 @@ exports[`should provide node preset as expected 1`] = `
109109
"exclude": [
110110
"transform-typeof-symbol",
111111
],
112-
"modules": false,
112+
"modules": "commonjs",
113113
"targets": [
114114
"node >= 16",
115115
],

packages/cli/babel-preset/tests/__snapshots__/web.test.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ exports[`should allow to enable legacy decorator 1`] = `
3838
"include": [
3939
"@babel/plugin-transform-class-properties",
4040
],
41-
"modules": false,
41+
"modules": "commonjs",
4242
"targets": [
4343
"Chrome >= 53",
4444
],
@@ -95,7 +95,7 @@ exports[`should allow to enable specific version decorator 1`] = `
9595
"exclude": [
9696
"transform-typeof-symbol",
9797
],
98-
"modules": false,
98+
"modules": "commonjs",
9999
"targets": [
100100
"Chrome >= 53",
101101
],
@@ -145,7 +145,7 @@ exports[`should provide web preset as expected 1`] = `
145145
"exclude": [
146146
"transform-typeof-symbol",
147147
],
148-
"modules": false,
148+
"modules": "commonjs",
149149
"targets": [
150150
"Chrome >= 53",
151151
],
@@ -176,7 +176,7 @@ exports[`should provide web preset as expected when presetEnv is empty object 1`
176176
"exclude": [
177177
"transform-typeof-symbol",
178178
],
179-
"modules": false,
179+
"modules": "commonjs",
180180
},
181181
],
182182
[
@@ -239,7 +239,7 @@ exports[`should support inject core-js polyfills by entry 1`] = `
239239
"exclude": [
240240
"transform-typeof-symbol",
241241
],
242-
"modules": false,
242+
"modules": "commonjs",
243243
"targets": [
244244
"Chrome >= 53",
245245
],
@@ -292,7 +292,7 @@ exports[`should support inject core-js polyfills by usage 1`] = `
292292
"exclude": [
293293
"transform-typeof-symbol",
294294
],
295-
"modules": false,
295+
"modules": "commonjs",
296296
"targets": [
297297
"Chrome >= 53",
298298
],

packages/cli/builder/tests/__snapshots__/babel.test.ts.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ exports[`plugin-babel (rspack mode) > should merge environment and shared babel
6969
},
7070
"rspackExperiments": {
7171
"collectTypeScriptInfo": {
72-
"exportedEnum": true,
72+
"exportedEnum": false,
7373
"typeExports": true,
7474
},
7575
},
@@ -79,7 +79,7 @@ exports[`plugin-babel (rspack mode) > should merge environment and shared babel
7979
"loader": "<WORKSPACE>/node_modules/<PNPM_INNER>/@rsbuild/plugin-babel/compiled/babel-loader/index.js",
8080
"options": {
8181
"babelrc": false,
82-
"compact": true,
82+
"compact": false,
8383
"configFile": false,
8484
"plugins": [
8585
[
@@ -199,7 +199,7 @@ exports[`plugin-babel (rspack mode) > should merge environment and shared babel
199199
},
200200
"rspackExperiments": {
201201
"collectTypeScriptInfo": {
202-
"exportedEnum": true,
202+
"exportedEnum": false,
203203
"typeExports": true,
204204
},
205205
},
@@ -209,7 +209,7 @@ exports[`plugin-babel (rspack mode) > should merge environment and shared babel
209209
"loader": "<WORKSPACE>/node_modules/<PNPM_INNER>/@rsbuild/plugin-babel/compiled/babel-loader/index.js",
210210
"options": {
211211
"babelrc": false,
212-
"compact": true,
212+
"compact": false,
213213
"configFile": false,
214214
"plugins": [
215215
[
@@ -321,7 +321,7 @@ exports[`plugin-babel (rspack mode) > should not set babel-loader when babel con
321321
},
322322
"rspackExperiments": {
323323
"collectTypeScriptInfo": {
324-
"exportedEnum": true,
324+
"exportedEnum": false,
325325
"typeExports": true,
326326
},
327327
},
@@ -406,7 +406,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config
406406
},
407407
"rspackExperiments": {
408408
"collectTypeScriptInfo": {
409-
"exportedEnum": true,
409+
"exportedEnum": false,
410410
"typeExports": true,
411411
},
412412
},
@@ -416,7 +416,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when babel config
416416
"loader": "<WORKSPACE>/node_modules/<PNPM_INNER>/@rsbuild/plugin-babel/compiled/babel-loader/index.js",
417417
"options": {
418418
"babelrc": false,
419-
"compact": true,
419+
"compact": false,
420420
"configFile": false,
421421
"plugins": [
422422
[
@@ -528,7 +528,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when environment b
528528
},
529529
"rspackExperiments": {
530530
"collectTypeScriptInfo": {
531-
"exportedEnum": true,
531+
"exportedEnum": false,
532532
"typeExports": true,
533533
},
534534
},
@@ -538,7 +538,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when environment b
538538
"loader": "<WORKSPACE>/node_modules/<PNPM_INNER>/@rsbuild/plugin-babel/compiled/babel-loader/index.js",
539539
"options": {
540540
"babelrc": false,
541-
"compact": true,
541+
"compact": false,
542542
"configFile": false,
543543
"plugins": [
544544
[
@@ -650,7 +650,7 @@ exports[`plugin-babel (rspack mode) > should set babel-loader when environment b
650650
},
651651
"rspackExperiments": {
652652
"collectTypeScriptInfo": {
653-
"exportedEnum": true,
653+
"exportedEnum": false,
654654
"typeExports": true,
655655
},
656656
},

packages/cli/builder/tests/__snapshots__/cache.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ exports[`builder rspack with cache > should generator rspack config correctly wi
1212
"type": "filesystem",
1313
},
1414
"type": "persistent",
15-
"version": "web-production",
15+
"version": "web-test",
1616
}
1717
`;

packages/cli/builder/tests/__snapshots__/parseConfig.test.ts.snap

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ exports[`parseCommonConfig > output.disableCssModuleExtension 1`] = `
151151
},
152152
"polyfill": "entry",
153153
"sourceMap": {
154-
"css": false,
154+
"css": true,
155155
},
156156
},
157157
"performance": {},
@@ -160,6 +160,8 @@ exports[`parseCommonConfig > output.disableCssModuleExtension 1`] = `
160160
"security": {},
161161
"server": {
162162
"htmlFallback": false,
163+
"middlewareMode": true,
164+
"port": 8080,
163165
"printUrls": false,
164166
"publicDir": false,
165167
},

0 commit comments

Comments
 (0)