Skip to content

Commit

Permalink
test: full enable some webpack stats test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
LingyuCoder committed Jul 18, 2024
1 parent 56681e4 commit cf70796
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1168,15 +1168,15 @@ Object {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/has_own_property",
"identifier": "webpack/runtime/define_property_getters",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/has_own_property",
"name": "webpack/runtime/define_property_getters",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -1185,9 +1185,9 @@ Object {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 107,
"size": 290,
"sizes": Object {
"runtime": 107,
"runtime": 290,
},
"type": "module",
"usedExports": null,
Expand All @@ -1208,15 +1208,15 @@ Object {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/make_namespace_object",
"identifier": "webpack/runtime/has_own_property",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/make_namespace_object",
"name": "webpack/runtime/has_own_property",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -1225,9 +1225,9 @@ Object {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 280,
"size": 107,
"sizes": Object {
"runtime": 280,
"runtime": 107,
},
"type": "module",
"usedExports": null,
Expand All @@ -1248,15 +1248,15 @@ Object {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/define_property_getters",
"identifier": "webpack/runtime/make_namespace_object",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/define_property_getters",
"name": "webpack/runtime/make_namespace_object",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -1265,9 +1265,9 @@ Object {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 290,
"size": 280,
"sizes": Object {
"runtime": 290,
"runtime": 280,
},
"type": "module",
"usedExports": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ chunk {909} (runtime: main) bundle.js (main) 7 bytes (asset) 159 bytes (javascri
| [no exports]
| [no exports used]
| ModuleConcatenation bailout: Module is an entry point
| ./raw.png [193] 7 bytes (asset) 42 bytes (javascript) {909} [depth 1] [built] [code generated]
| ./raw.png [193] 42 bytes (javascript) 7 bytes (asset) {909} [depth 1] [built] [code generated]
| [no exports]
| [no exports used]
| esm import ./raw.png
./raw.png [193] 7 bytes (asset) 42 bytes (javascript) {909} [depth 1] [built] [code generated]
./raw.png [193] 42 bytes (javascript) 7 bytes (asset) {909} [depth 1] [built] [code generated]
[no exports]
[no exports used]
esm import ./raw.png
Expand All @@ -43,19 +43,19 @@ modules by path ./ 235 bytes (javascript) 7 bytes (asset)
| [no exports]
| [no exports used]
| ModuleConcatenation bailout: Module is an entry point
| ./raw.png [193] 7 bytes (asset) 42 bytes (javascript) {909} [depth 1] [built] [code generated]
| ./raw.png [193] 42 bytes (javascript) 7 bytes (asset) {909} [depth 1] [built] [code generated]
| [no exports]
| [no exports used]
| esm import ./raw.png
./raw.png [193] 7 bytes (asset) 42 bytes (javascript) {909} [depth 1] [built] [code generated]
./raw.png [193] 42 bytes (javascript) 7 bytes (asset) {909} [depth 1] [built] [code generated]
[no exports]
[no exports used]
esm import ./raw.png
runtime modules 1.28 KiB
webpack/runtime/global 223 bytes {909} [code generated]
webpack/runtime/auto_public_path 1.06 KiB {909} [code generated]
[no exports]
[used exports unknown]
webpack/runtime/auto_public_path 1.06 KiB {909} [code generated]
webpack/runtime/global 223 bytes {909} [code generated]
[no exports]
[used exports unknown]
Expand Down Expand Up @@ -409,10 +409,10 @@ Rspack x.x.x compiled with 1 error in X s"
`;
exports[`statsOutput statsOutput/runtime-modules should print correct stats for 1`] = `
"webpack/runtime/has_own_property 107 bytes [code generated]
webpack/runtime/make_namespace_object 280 bytes [code generated]
"./index.js 19 bytes [built] [code generated]
webpack/runtime/define_property_getters 290 bytes [code generated]
./index.js 19 bytes [built] [code generated]"
webpack/runtime/has_own_property 107 bytes [code generated]
webpack/runtime/make_namespace_object 280 bytes [code generated]"
`;
exports[`statsOutput statsOutput/runtime-specific-exports should print correct stats for 1`] = `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ module.exports = {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/has_own_property",
"identifier": "webpack/runtime/compat_get_default_export",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/has_own_property",
"name": "webpack/runtime/compat_get_default_export",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -70,9 +70,9 @@ module.exports = {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 107,
"size": 309,
"sizes": Object {
"runtime": 107,
"runtime": 309,
},
"type": "module",
"usedExports": null,
Expand All @@ -91,15 +91,15 @@ module.exports = {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/make_namespace_object",
"identifier": "webpack/runtime/define_property_getters",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/make_namespace_object",
"name": "webpack/runtime/define_property_getters",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -108,9 +108,9 @@ module.exports = {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 280,
"size": 290,
"sizes": Object {
"runtime": 280,
"runtime": 290,
},
"type": "module",
"usedExports": null,
Expand All @@ -129,15 +129,15 @@ module.exports = {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/define_property_getters",
"identifier": "webpack/runtime/has_own_property",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/define_property_getters",
"name": "webpack/runtime/has_own_property",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -146,9 +146,9 @@ module.exports = {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 290,
"size": 107,
"sizes": Object {
"runtime": 290,
"runtime": 107,
},
"type": "module",
"usedExports": null,
Expand All @@ -167,15 +167,15 @@ module.exports = {
"errors": 0,
"failed": false,
"id": "",
"identifier": "webpack/runtime/compat_get_default_export",
"identifier": "webpack/runtime/make_namespace_object",
"index": undefined,
"index2": undefined,
"issuer": undefined,
"issuerId": undefined,
"issuerName": undefined,
"issuerPath": Array [],
"moduleType": "runtime",
"name": "webpack/runtime/compat_get_default_export",
"name": "webpack/runtime/make_namespace_object",
"nameForCondition": undefined,
"optimizationBailout": Array [],
"optional": false,
Expand All @@ -184,9 +184,9 @@ module.exports = {
"preOrderIndex": undefined,
"providedExports": Array [],
"reasons": Array [],
"size": 309,
"size": 280,
"sizes": Object {
"runtime": 309,
"runtime": 280,
},
"type": "module",
"usedExports": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,40 @@ module.exports = {
expect(JSON.parse(JSON.stringify(executedModules, replacePath)))
.toMatchInlineSnapshot(`
Array [
Object {
"buildTimeExecuted": true,
"built": true,
"cacheable": true,
"cached": false,
"chunks": Array [],
"codeGenerated": true,
"errors": 0,
"failed": false,
"identifier": "<RSPACK_ROOT>/node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css",
"issuerPath": Array [],
"moduleType": "javascript/auto",
"name": "./fixtures/css/style.css!=!../../../node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!./fixtures/css/style.css",
"nameForCondition": "<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css",
"optimizationBailout": Array [
"Statement with side_effects in source code at ./fixtures/css/style.css!=!../../../node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!./fixtures/css/style.css:4:0-100",
],
"optional": false,
"orphan": true,
"providedExports": null,
"reasons": Array [
Object {
"type": "loader import",
"userRequest": "<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css.webpack[javascript/auto]!=!!!<RSPACK_ROOT>/node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css",
},
],
"size": 710,
"sizes": Object {
"javascript": 710,
},
"type": "module",
"usedExports": null,
"warnings": 0,
},
Object {
"buildTimeExecuted": true,
"built": true,
Expand Down Expand Up @@ -156,40 +190,6 @@ module.exports = {
"usedExports": null,
"warnings": 0,
},
Object {
"buildTimeExecuted": true,
"built": true,
"cacheable": true,
"cached": false,
"chunks": Array [],
"codeGenerated": true,
"errors": 0,
"failed": false,
"identifier": "<RSPACK_ROOT>/node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css",
"issuerPath": Array [],
"moduleType": "javascript/auto",
"name": "./fixtures/css/style.css!=!../../../node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!./fixtures/css/style.css",
"nameForCondition": "<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css",
"optimizationBailout": Array [
"Statement with side_effects in source code at ./fixtures/css/style.css!=!../../../node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!./fixtures/css/style.css:4:0-100",
],
"optional": false,
"orphan": true,
"providedExports": null,
"reasons": Array [
Object {
"type": "loader import",
"userRequest": "<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css.webpack[javascript/auto]!=!!!<RSPACK_ROOT>/node_modules/.pnpm/css-loader@6.11.0_@rspack+core@packages+rspack_webpack@5.92.0_webpack-cli@5.1.4_webpack@5.92.0__/node_modules/css-loader/dist/cjs.js!<RSPACK_ROOT>/packages/rspack-test-tools/tests/fixtures/css/style.css",
},
],
"size": 710,
"sizes": Object {
"javascript": 710,
},
"type": "module",
"usedExports": null,
"warnings": 0,
},
]
`);
}
Expand Down
Loading

0 comments on commit cf70796

Please sign in to comment.