Skip to content
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

feat: migrate mocha to jest for running tests #148

Closed
wants to merge 2 commits into from

Conversation

frederikprijck
Copy link
Member

@frederikprijck frederikprijck commented Jul 6, 2023

Description

Even though this repository is advertised to be used mostly in a browser context, it's also used on node. This PR:

  • Migrates to jest like we do with most SDKs
  • Ensures we run the tests against both browser (jsdom) and node environments.
  • Collects coverage
  • Run test against sources rather than dist.

This uncovers a coverage drop when running against browser:

image

However, this actualy comes from the fact that on browsers, our polyfill is never used while on node it's always used. Even when the platform supports atob, see #145

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

Migrating mocha to jest and run tests against both node and browser (jsdom) environments.
@frederikprijck frederikprijck requested a review from a team as a code owner July 6, 2023 09:58
@frederikprijck frederikprijck changed the title Migrate mocha to jest for running tests feat: migrate mocha to jest for running tests Jul 6, 2023
@jonkoops
Copy link
Contributor

@frederikprijck this branch can probably be deleted now that the work on the beta branch has landed.

@frederikprijck frederikprijck deleted the feat/jest branch July 28, 2023 11:11
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.

3 participants