Skip to content

test(hmr): refactor live-reload tests to use temp directory#6690

Merged
chenjiahan merged 1 commit intomainfrom
live_reload_e2e_1203
Dec 3, 2025
Merged

test(hmr): refactor live-reload tests to use temp directory#6690
chenjiahan merged 1 commit intomainfrom
live_reload_e2e_1203

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Refactor live reload tests to use copySrcDir helper to create temporary test directory instead of modifying original source files directly. This improves test isolation and reliability.

Checklist

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

Copilot AI review requested due to automatic review settings December 3, 2025 10:03
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 3, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 5013a70
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/69300af5af875c0008eed462
😎 Deploy Preview https://deploy-preview-6690--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 75 (🟢 up 11 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

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 refactors the live-reload HMR tests to use isolated temporary directories instead of directly modifying source files, improving test isolation and reliability.

Key Changes

  • Removed manual file backup/restore logic (beforeEach/afterEach hooks) that was previously needed to preserve original source files
  • Integrated copySrcDir helper to create temporary test directories, ensuring each test run works with a clean, isolated copy
  • Updated dev server configuration to explicitly point to entry files in the temporary directory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chenjiahan chenjiahan merged commit 99a75ac into main Dec 3, 2025
18 checks passed
@chenjiahan chenjiahan deleted the live_reload_e2e_1203 branch December 3, 2025 10:54
@chenjiahan chenjiahan mentioned this pull request Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants