Skip to content

Conversation

LingyuCoder
Copy link
Contributor

@LingyuCoder LingyuCoder commented Oct 10, 2025

Summary

  • Rewrite some webpack watch test cases to rspack compiler test cases.
  • Enable development and production mode of normal test cases just like webpack.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Copilot Copilot AI review requested due to automatic review settings October 10, 2025 11:20
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Oct 10, 2025
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 20d25d4
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68e9d3c794c7d7000810e7d1

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aligns more test cases with webpack by adding comprehensive test coverage for compiler functionality, watch mode, and plugins, and enhances the test infrastructure to support both development and production modes.

Key Changes:

  • Adds multiple new compiler test cases covering watch events, file change detection, and banner plugin functionality
  • Introduces development and production mode test runners for better webpack compatibility
  • Fixes quote escaping in DefinePlugin configuration to match webpack behavior

Reviewed Changes

Copilot reviewed 14 out of 24 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/rspack-test/normalCases/parsing/issue-7519/test.config.js Fixed DefinePlugin quote escaping to use proper string format
tests/rspack-test/multiCompilerCases/watch-events.js Added test for watch-close event in multi-compiler mode
tests/rspack-test/compilerCases/watch.js Added comprehensive watch mode tests for single compilation and invalidation
tests/rspack-test/compilerCases/watch-events.js Added watch-close event test for single compiler
tests/rspack-test/compilerCases/watch-detection.js Added file change detection tests with various timeout scenarios
tests/rspack-test/compilerCases/watch-close.js Added test for multiple watcher close callback handling
tests/rspack-test/compilerCases/changes-and-removals.js Added tests for tracking file modifications and removals
tests/rspack-test/compilerCases/banner-plugin.js Added BannerPlugin tests for asset caching and footer placement
tests/rspack-test/Normal-prod.test.js Added production mode test runner with exclusions
tests/rspack-test/Normal-dev.test.js Added development mode test runner with exclusions
packages/rspack-test-tools/src/helper/directory.ts Fixed path handling for cross-platform exclude pattern matching
packages/rspack-test-tools/src/case/normal.ts Enhanced test infrastructure to support dev/prod mode creation
packages/rspack-test-tools/src/case/index.ts Exported new dev/prod normal case creators
packages/rspack-test-tools/etc/test-tools.api.md Updated API documentation for new case creators

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

github-actions bot commented Oct 10, 2025

📦 Binary Size-limit

Comparing 20d25d4 to feat(mf): support lazy compilation (#11779) by Hanric

🙈 Size remains the same at 47.89MB

Copy link

codspeed-hq bot commented Oct 10, 2025

CodSpeed Performance Report

Merging #11834 will not alter performance

Comparing test/more-test (20d25d4) with main (b4bf7a8)

Summary

✅ 17 untouched

@LingyuCoder LingyuCoder requested a review from hardfist October 11, 2025 04:58
@LingyuCoder LingyuCoder merged commit f11acd2 into main Oct 11, 2025
46 checks passed
@LingyuCoder LingyuCoder deleted the test/more-test branch October 11, 2025 05:04
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants