Skip to content

[Tracking]: Test infrastructure #5685

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
h-a-n-a opened this issue Feb 19, 2024 · 0 comments · Fixed by #5755
Closed

[Tracking]: Test infrastructure #5685

h-a-n-a opened this issue Feb 19, 2024 · 0 comments · Fixed by #5755
Assignees
Labels
team The issue/pr is created by the member of Rspack. tracking issue Category: A tracking issue for an RFC or an unstable feature.
Milestone

Comments

@h-a-n-a
Copy link
Contributor

h-a-n-a commented Feb 19, 2024

This tracking issue tracks every task related to task infrastructures to fulfill our needs in either aligning rspack to webpack or adding rspack's own testing infrastructures.

Goals

1. Decouple webpack-tests from rspack-tests. In old days of rspack development, we mixed rspack tests and webpack tests in packages/rspack/tests and recently we discovered that this will make us harder to distinguish tests with webpack and make it harder for us to track the progress of alignment. In this stage, we will try remove webpack test cases from rspack tests.

2. Align existing test runners. The old test runners are forked with modifications from webpack. To align as much as possible, we have to align test runners with webpack. In this stage, we will replace rspack old test runners with original webpack.

3. Move rspack-specific test runner to packages/rspack-test-tools.

4. Panic free tests. Test whether it's enabled or not should be panic free. In this stage, we will enable every test case and test if it's panic-free. Details will be added by
@Boshen soon.

5. Design new test runners. Add new test runners for benchmarking, dts checking and so on. Details will be added by @LingyuCoder soon.

How

1. Decouple webpack-tests from rspack-tests. (DONE) To check if there's any tests coupled, run node scripts/test/diff.cjs in the root directory of this repo. This check has already been enabled in CI.

2. Align existing test runners. (DONE) Port webpack test runners to packages/rspack/tests, and try to pass rspack tests. Adjusting old rspack test cases is allowed. Make sure to add CHANGE comment to rspack-specific to track the difference, for example:

// CHANGE: "size" is not supported yet
moduleIds: "named"

3. Move rspack-specific test runner to packages/rspack-test-tools. Move all rspack-only test runners and its cases to packages/rspack-test-tools and remove ts configuration in old packages/rspack/tests.

4. Panic free tests.

5. Design new test runners. (WIP)

Tasks

Align existing test runners

- [ ] https://github.com/web-infra-dev/rspack/issues/5686
- [ ] https://github.com/web-infra-dev/rspack/issues/5687
- [ ] https://github.com/web-infra-dev/rspack/issues/5688
- [ ] https://github.com/web-infra-dev/rspack/issues/5689
- [ ] https://github.com/web-infra-dev/rspack/issues/5703
- [ ] https://github.com/web-infra-dev/rspack/issues/5704
- [ ] https://github.com/web-infra-dev/rspack/issues/5705
- [ ] https://github.com/web-infra-dev/rspack/issues/5706
- [ ] https://github.com/web-infra-dev/rspack/issues/5707
- [ ] https://github.com/web-infra-dev/rspack/issues/5708
- [ ] https://github.com/web-infra-dev/rspack/issues/5797
- [ ] https://github.com/web-infra-dev/rspack/issues/5800

Check panics

- [ ] https://github.com/web-infra-dev/rspack/issues/5769
### New Test Tools
- [x] Test Tools Implementation: https://github.com/web-infra-dev/rspack/pull/5755
- [x] Migrate Test cases: https://github.com/web-infra-dev/rspack/pull/6367
- [x] Add Config Types: https://github.com/web-infra-dev/rspack/pull/6552
- [x] Add Dev Guides: https://github.com/web-infra-dev/rspack/pull/6519
@h-a-n-a h-a-n-a added the tracking issue Category: A tracking issue for an RFC or an unstable feature. label Feb 19, 2024
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Feb 19, 2024
@h-a-n-a h-a-n-a self-assigned this Feb 19, 2024
@LingyuCoder LingyuCoder linked a pull request Feb 23, 2024 that will close this issue
2 tasks
@h-a-n-a h-a-n-a pinned this issue Feb 29, 2024
@h-a-n-a h-a-n-a mentioned this issue Feb 29, 2024
2 tasks
@h-a-n-a h-a-n-a added this to the 1.0.0 milestone Feb 29, 2024
@LingyuCoder LingyuCoder reopened this Mar 8, 2024
@h-a-n-a h-a-n-a unpinned this issue May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack. tracking issue Category: A tracking issue for an RFC or an unstable feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants