Skip to content

test: stabilize target worker e2e#237

Merged
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-target-worker-flake
Jun 21, 2026
Merged

test: stabilize target worker e2e#237
chenjiahan merged 1 commit into
mainfrom
chenjiahan/fix-target-worker-flake

Conversation

@chenjiahan

Copy link
Copy Markdown
Member

Summary

This PR fixes a Windows CI flaky failure in the target e2e test. The test asserted console snapshots right after networkidle0, but worker postMessage logs can arrive slightly later, so the snapshot sometimes missed both Worker said messages. It now polls for the worker messages before snapshotting and keeps the final console snapshot order stable.

Related Links

@chenjiahan chenjiahan marked this pull request as ready for review June 21, 2026 12:10
@chenjiahan chenjiahan merged commit 741f0c8 into main Jun 21, 2026
3 checks passed
@chenjiahan chenjiahan deleted the chenjiahan/fix-target-worker-flake branch June 21, 2026 12:11
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 93012adb-e2ea-48dc-b8f5-179d4c66cd20

📥 Commits

Reviewing files that changed from the base of the PR and between 20ade13 and 0173323.

📒 Files selected for processing (1)
  • tests/e2e/target.test.js

📝 Walkthrough

Walkthrough

The e2e target test file gains a workerConsoleMessages array listing expected worker console strings and a waitForWorkerConsoleMessages async helper that polls the collected consoleMessages array until entries prefixed with Worker said: match the expected ordered sequence. The sortByTerm comparator is updated to use includes(). Two existing multi-compiler webworker test cases (web + webworker default and with devServer: false) now await this helper after page navigation before asserting console message and page error snapshots.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chenjiahan/fix-target-worker-flake

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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