Skip to content

chore(tests): corejs update and wrap fetchMock.restore()/reset() in arrow functions for… #1189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

katesaikishore
Copy link

@katesaikishore katesaikishore commented May 22, 2025

Core-js update@latest and Wrap fetchMock hooks in arrow functions for Jest hooks

Update

  • Primary task: Upgraded fetch-mock to v9.11.0, which removed [email protected] and now depends on [email protected].
  • Interim work: Fixed Jest hook errors by wrapping fetchMock.restore() and fetchMock.reset() in arrow callbacks.
  • Changes committed on branch chore/wrap-fetchmock-hooks with message:
    chore(tests): wrap fetchMock hooks in arrow functions for Jest hooks

Changes

  • Bumped fetch-mock from v7.7.3 → v9.11.0 (core-js 2 → 3 upgrade).
  • beforeEach(fetchMock.restore)beforeEach(() => fetchMock.restore())
  • afterEach(fetchMock.reset)afterEach(() => fetchMock.reset())

Testing

  1. → All tests pass without hook-related failures.
  2. Verified mocking behavior in the example/ app flows to ensure no regressions.

Scope

This change updates existing tests only (no new public APIs)

References

Checklist

  • I have read the Auth0 general contribution guidelines
  • All existing and new tests complete without errors
  • All active GitHub checks have passed

Testing

  1. Run all unit tests:
    npm test
    

Screenshot 2025-05-22 at 5 23 54 PM

@katesaikishore katesaikishore changed the title chore(tests): wrap fetchMock.restore()/reset() in arrow functions for… chore(tests): corejs update and wrap fetchMock.restore()/reset() in arrow functions for… May 22, 2025
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