Skip to content

Simplify app event watcher test polling#8068

Open
alfonso-noriega wants to merge 1 commit into
mainfrom
maintenance/app-event-watcher-polling
Open

Simplify app event watcher test polling#8068
alfonso-noriega wants to merge 1 commit into
mainfrom
maintenance/app-event-watcher-polling

Conversation

@alfonso-noriega

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

No issue.

The app event watcher tests had a small custom polling loop that duplicated Vitest's wait helper and used a manual setTimeout/Date.now timeout path. Using the framework helper keeps the test wait behavior simpler and preserves useful timeout diagnostics.

WHAT is this pull request doing?

  • Replaces the custom waitForWatcherEmit polling promise with vi.waitFor.
  • Keeps the same 10ms polling interval and timeout parameter.
  • Includes the emitted event names in the assertion message when the expected event is not observed.

How to test your changes?

  • pnpm --filter @shopify/app vitest src/cli/services/dev/app-events/app-event-watcher.test.ts
  • pnpm --filter @shopify/app lint
  • git diff --check
  • pnpm --filter @shopify/app type-check ⚠️ attempted; fails on current origin/main due existing @shopify/organizations/Organization type resolution errors outside this diff.

Post-release steps

None.

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes
  • I've considered analytics changes to measure impact
  • The change is not user-facing; no changeset is needed.

@alfonso-noriega alfonso-noriega requested a review from a team as a code owner July 13, 2026 09:56
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Jul 13, 2026
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Jul 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants