这是indexloc提供的服务,不要输入任何密码
Skip to content

test: add unit tests for Watch Mode change event handling #10678

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anthonyshew
Copy link
Contributor

@anthonyshew anthonyshew commented Jul 15, 2025

This PR adds comprehensive unit test coverage for the previously untested handle_change_event function and ChangedPackages enum in the watch mode functionality.

Changes

  • 10 new unit tests covering all aspects of package change event handling
  • Tests for all three event types: PackageChanged, RediscoverPackages, and Error
  • Coverage of state transitions between Some packages and All packages states
  • Edge case testing including duplicates, empty states, and error propagation

- Add 10 unit tests for handle_change_event function and ChangedPackages enum
- Tests cover all three event types: PackageChanged, RediscoverPackages, Error
- Tests state transitions between Some packages and All packages states
- Tests edge cases like duplicates, empty states, and error propagation
- Improves coverage for critical watch mode business logic
Copy link

vercel bot commented Jul 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-gatsby-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-kitchensink-blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-nonmonorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-svelte-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 1:05pm

@anthonyshew anthonyshew requested a review from a team as a code owner July 15, 2025 13:04
@anthonyshew anthonyshew changed the title test: add comprehensive unit tests for watch mode change event handling test: add unit tests for Watch Mode change event handling Jul 16, 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.

1 participant