Skip to content

Make metadata timer tests deterministic#7917

Open
alfonso-noriega wants to merge 1 commit into
mainfrom
06-24-make_metadata_timer_tests_deterministic
Open

Make metadata timer tests deterministic#7917
alfonso-noriega wants to merge 1 commit into
mainfrom
06-24-make_metadata_timer_tests_deterministic

Conversation

@alfonso-noriega

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Fixes #0000

The metadata timer tests used short real sleeps to create measurable durations. Those sleeps make the tests depend on scheduler timing even though the behavior under test only needs elapsed performance.now() values.

WHAT is this pull request doing?

Replaces the real sleeps in the nested metadata timer tests with a tiny mocked performance clock. The tests now advance the clock explicitly while keeping the same nested timer structure and performance measure assertions.

No changeset is included because this is test-only maintenance with no user-facing behavior change.

How to test your changes?

  • pnpm --filter @shopify/cli-kit vitest -- src/public/node/metadata.test.ts
  • pnpm --filter @shopify/cli-kit type-check
  • pnpm --filter @shopify/cli-kit lint
  • git diff --check

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
  • This change is not user-facing, so no changeset is required

Assisted-By: devx/3c9d2be5-81a1-4ad5-90ba-4155c6ff125d
@alfonso-noriega alfonso-noriega requested a review from a team as a code owner June 24, 2026 13:11
@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 Jun 24, 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.

1 participant