Skip to content

Simplify app event watcher test polling#8068

Merged
alfonso-noriega merged 1 commit into
mainfrom
maintenance/app-event-watcher-polling
Jul 14, 2026
Merged

Simplify app event watcher test polling#8068
alfonso-noriega merged 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
@alfonso-noriega alfonso-noriega added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 64ae39f Jul 14, 2026
29 of 30 checks passed
@alfonso-noriega alfonso-noriega deleted the maintenance/app-event-watcher-polling branch July 14, 2026 09:24
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