test: do not snapshot the whole main file in css extract test cases#9408
Merged
LingyuCoder merged 1 commit intomainfrom Feb 21, 2025
Merged
test: do not snapshot the whole main file in css extract test cases#9408LingyuCoder merged 1 commit intomainfrom
LingyuCoder merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for rspack canceled.
|
07e444b to
ea29bae
Compare
CodSpeed Performance ReportMerging #9408 will not alter performanceComparing 🎉 Hooray!
|
JSerFeng
approved these changes
Feb 21, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request includes several changes to the
tests/plugin-test/css-extractdirectory, focusing on adding new test files and updating expected output files for various test cases. The most important changes include adding new test files for multiple cases, updating expected output files to remove redundant webpack bootstrap code, and adding error handling in theTestCasestest suite.New test files added:
tests/plugin-test/css-extract/cases/chunkFilename-fullhash/test.js: Added a new test file to check the content ofmain.jsfor specific webpack runtime functions.tests/plugin-test/css-extract/cases/custom-loader-with-functional-exports/test.js: Added a new test file to verify the presence of specific class names inmain.js.tests/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/test.js: Added a new test file to check the content ofcommon.jsfor specific CSS modules.tests/plugin-test/css-extract/cases/dependOn/test.js: Added a new test file to verify the presence of specific CSS modules incommon.js.tests/plugin-test/css-extract/cases/es-module-concatenation-modules/test.js: Added a new test file to check the concatenation of CSS modules inmain.js.Updates to expected output files:
tests/plugin-test/css-extract/cases/custom-loader-with-functional-exports/expected/main.js: Removed redundant webpack bootstrap code and module cache.tests/plugin-test/css-extract/cases/dependOn-multiple-files-per-entry/expected/common.js: Removed redundant webpack bootstrap code and module cache.tests/plugin-test/css-extract/cases/dependOn/expected/common.js: Removed redundant webpack bootstrap code and module cache.tests/plugin-test/css-extract/cases/es-module-concatenation-modules/expected/main.js: Removed redundant webpack bootstrap code and module cache.tests/plugin-test/css-extract/cases/es-module-concatenation/expected/main.js: Removed redundant webpack bootstrap code and module cache.Error handling improvements:
tests/plugin-test/css-extract/TestCases.test.js: Added try-catch blocks to handle errors during test execution and ensuredoneis called with the error if an exception occurs. [1] [2]Checklist