Note: The
tests/webpack-test
is heavily based on webpack/test
Originally, we use this formula to calculate the compatibility passedTestCaseCount / totalTestCount
, totalTestCount = passedTestCaseCount + failedTestCount + skippedTestCount , but sometimes it maybe hard to compatible with all webpack test cases for some reasons (e.g. performance, legacy feature that we don't want to support), we need a method to skip these tests that we will not support. Thus, we adjust the original formula to (passedTestCaseCount + willNotSupportTestCount) / totalTestCount
.
Currently, we use a test.filter.js
under each failed test case directory to skip failed test case, using this method could let us migrate webpack test case progressively without affect the real compatibility (Because this method will not influence the real passedTestCaseCount
).
e.g.
When you find that we have passed some failed testcases which is skipped for now, you could change the test.filter.js
to
or delete the test.filter.js
Based on implementation differences and performance considerations, Rspack will integrate some webpack plugins internally. The test suite for the plugins will also be copied to the rspack-plugin-ci for testing plugin compatibility.
Therefore, in order to maintain consistency with the original repository, it is not recommended to modify these test cases, except in the following scenarios:
In scenarios other than those mentioned above, please follow the Rspack Testing guidelines for adding test cases.