Skip to content

Commit

Permalink
test: enable .spec.ts test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
LingyuCoder committed Jan 14, 2025
1 parent d5590a5 commit 330cb5d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,9 @@ exports[`module graph transform from stats > normal module in multi concatenatio
"renderId": undefined,
"rootModule": 2,
"size": {
"parsedSize": 0,
"sourceSize": 162,
"transformedSize": 162,
"parsedSize": -1,
"sourceSize": -1,
"transformedSize": -1,
},
"webpackId": "",
},
Expand All @@ -1061,9 +1061,9 @@ exports[`module graph transform from stats > normal module in multi concatenatio
"path": "entry1.js",
"renderId": undefined,
"size": {
"parsedSize": 0,
"sourceSize": 78,
"transformedSize": 78,
"parsedSize": -1,
"sourceSize": -1,
"transformedSize": -1,
},
"webpackId": "",
},
Expand All @@ -1087,9 +1087,9 @@ exports[`module graph transform from stats > normal module in multi concatenatio
"path": "common.js",
"renderId": undefined,
"size": {
"parsedSize": 0,
"sourceSize": 84,
"transformedSize": 84,
"parsedSize": -1,
"sourceSize": -1,
"transformedSize": -1,
},
"webpackId": "",
},
Expand All @@ -1111,9 +1111,9 @@ exports[`module graph transform from stats > normal module in multi concatenatio
"renderId": "1",
"rootModule": 5,
"size": {
"parsedSize": 0,
"sourceSize": 162,
"transformedSize": 162,
"parsedSize": -1,
"sourceSize": -1,
"transformedSize": -1,
},
"webpackId": "",
},
Expand All @@ -1135,9 +1135,9 @@ exports[`module graph transform from stats > normal module in multi concatenatio
"path": "entry2.js",
"renderId": undefined,
"size": {
"parsedSize": 0,
"sourceSize": 78,
"transformedSize": 78,
"parsedSize": -1,
"sourceSize": -1,
"transformedSize": -1,
},
"webpackId": "",
},
Expand Down
8 changes: 7 additions & 1 deletion packages/core/tests/common/module-graph/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ describe('module graph transform from stats', () => {
const graphData = graph.toData();
expect(graphData.modules[0].webpackId.length).toBeTruthy();

graphData.modules.forEach((mod) => (mod.webpackId = ''));
graphData.modules.forEach((mod) => {
// prevent ci failed on win32
mod.webpackId = '';
mod.size.sourceSize = -1;
mod.size.transformedSize = -1;
mod.size.parsedSize = -1;
});
expect(graphData).toMatchSnapshot();
});

Expand Down

0 comments on commit 330cb5d

Please # to comment.