Skip to content

chore(profile-metrics-controller): replace Sinon with Jest in ProfileMetricsService tests#7916

Draft
cryptodev-2s wants to merge 1 commit intomainfrom
chore/profile-metrics-replace-sinon-with-jest
Draft

chore(profile-metrics-controller): replace Sinon with Jest in ProfileMetricsService tests#7916
cryptodev-2s wants to merge 1 commit intomainfrom
chore/profile-metrics-replace-sinon-with-jest

Conversation

@cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Feb 12, 2026

…MetricsService tests

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Test-only refactor that swaps fake-timer implementations and removes a dev dependency; risk is limited to potential flakiness/regressions in ProfileMetricsService timing-related tests.

Overview
Refactors ProfileMetricsService.test.ts to stop using Sinon fake timers and instead use Jest fake timers, updating retry/degraded/circuit-break tests to advance timers via jest.advanceTimersByTime and to mock performance.now/Date.now where needed.

Removes the sinon dev dependency from @metamask/profile-metrics-controller (and yarn.lock) and updates the test import to use HttpError from @metamask/controller-utils.

Written by Cursor Bugbot for commit 3d4a72a. This will update automatically on new commits. Configure here.

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner February 12, 2026 13:25
@cryptodev-2s cryptodev-2s changed the title chore(profile-metrics-controller): replace Sinon with Jest in ProfileMetricsService tests chore(profile-metrics-controller): replace Sinon with Jest in ProfileMetricsService tests Feb 12, 2026
@cryptodev-2s cryptodev-2s marked this pull request as draft February 12, 2026 13:26
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