-
-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
2,868 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/rspack-test-tools/tests/NewCodeSplitting-config.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const path = require("path"); | ||
const { describeByWalk, createConfigNewCodeSplittingCase } = require(".."); | ||
|
||
function v(name) { | ||
return path.join(__dirname, `new-code-splitting ${name}`) | ||
} | ||
|
||
// Run tests rspack-test-tools/tests/configCases | ||
describeByWalk("new-code-splitting config cases", (name, src, dist) => { | ||
createConfigNewCodeSplittingCase(name, src, dist); | ||
}, { | ||
source: path.resolve(__dirname, "./configCases"), | ||
dist: path.resolve(__dirname, `./js/new-code-splitting-config`), | ||
}); |
12 changes: 12 additions & 0 deletions
12
packages/rspack-test-tools/tests/NewCodeSplitting-stats-api.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const path = require("path"); | ||
const { describeByWalk, createStatsAPINewCodeSplittingCase } = require(".."); | ||
|
||
describeByWalk('new code splitting stats api', (name, testConfig, dist) => { | ||
createStatsAPINewCodeSplittingCase(name, __dirname, "none", testConfig); | ||
}, { | ||
absoluteDist: false, | ||
level: 1, | ||
type: "file", | ||
source: path.resolve(__dirname, './statsApiCases'), | ||
dist: path.resolve(__dirname, `./js/new-code-splitting-stats-api`), | ||
}); |
28 changes: 28 additions & 0 deletions
28
packages/rspack-test-tools/tests/NewCodeSplitting-stats-output.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const path = require("path"); | ||
const { describeByWalk, StatsProcessor, BasicCaseCreator, ECompilerType } = require(".."); | ||
|
||
const creator = new BasicCaseCreator({ | ||
clean: true, | ||
describe: false, | ||
steps: ({ name }) => [ | ||
new StatsProcessor({ | ||
name, | ||
compilerType: ECompilerType.Rspack, | ||
configFiles: ["rspack.config.js", "webpack.config.js"], | ||
overrideOptions(index, context, options) { | ||
options.experiments ??= {}; | ||
options.experiments.parallelCodeSplitting ??= true; | ||
return StatsProcessor.overrideOptions(index, context, options); | ||
} | ||
}) | ||
], | ||
description: () => "should print correct stats for" | ||
}); | ||
|
||
describeByWalk('new code splitting stats output', (name, src, dist) => { | ||
creator.create(name, src, dist); | ||
}, { | ||
level: 1, | ||
source: path.resolve(__dirname, './statsOutputCases'), | ||
dist: path.resolve(__dirname, `./js/new-code-splitting-stats-output`), | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.