Skip to content

test(native-watcher): init native watcher tests#12185

Merged
h-a-n-a merged 4 commits intomainfrom
watcher-test
Nov 13, 2025
Merged

test(native-watcher): init native watcher tests#12185
h-a-n-a merged 4 commits intomainfrom
watcher-test

Conversation

@h-a-n-a
Copy link
Copy Markdown
Contributor

@h-a-n-a h-a-n-a commented Nov 13, 2025

Summary

Initialize native watcher test cases.

Port https://github.com/webpack/watchpack/blob/b45446602cb428052d4b7800862d79da41f312bc/test/Watchpack.js#L18

Related links

Checklist

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

Copilot AI review requested due to automatic review settings November 13, 2025 07:59
@h-a-n-a h-a-n-a requested a review from quininer as a code owner November 13, 2025 07:59
@netlify
Copy link
Copy Markdown

netlify bot commented Nov 13, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 45cd33d
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/6915a6ee91f5c90008111499

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Nov 13, 2025
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 initializes test infrastructure and test cases for the native file system watcher functionality in rspack. It adds comprehensive test helpers, macros for convenient test setup, and an initial test case to validate watcher behavior.

Key Changes

  • Added test helper infrastructure with event collection and assertion utilities
  • Introduced convenience macros for concise test setup and execution
  • Added Default trait implementation for FsWatcherOptions to simplify test configuration
  • Enhanced ArcPath with AsRef<Path> implementation for better interoperability

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
crates/rspack_watcher/tests/watcher.rs New test file with macros and initial watcher test case
crates/rspack_watcher/tests/helpers/mod.rs Test helper infrastructure for managing temp directories, events, and watcher lifecycle
crates/rspack_watcher/src/lib.rs Added Default trait for options and test-only poll_interval field
crates/rspack_paths/src/lib.rs Added AsRef<Path> implementation for ArcPath
crates/rspack_watcher/Cargo.toml Added tempfile dev dependency for test isolation
Cargo.lock Updated lockfile with tempfile and its transitive dependencies

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 13, 2025

📦 Binary Size-limit

Comparing 45cd33d to fix: should transform output.path while emitting assets (#12181) by harpsealjs

🎉 Size decreased by 662.50KB from 48.10MB to 47.45MB (⬇️1.35%)

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Nov 13, 2025

CodSpeed Performance Report

Merging #12185 will not alter performance

Comparing watcher-test (45cd33d) with main (b4c08a1)

Summary

✅ 17 untouched

@h-a-n-a h-a-n-a enabled auto-merge (squash) November 13, 2025 09:54
@h-a-n-a h-a-n-a merged commit ccc95d7 into main Nov 13, 2025
44 checks passed
@h-a-n-a h-a-n-a deleted the watcher-test branch November 13, 2025 10:09
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.

3 participants