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

chore: added vitest for node and browser testing in abstrations #1099

Closed
wants to merge 3 commits into from

Conversation

musale
Copy link
Contributor

@musale musale commented Mar 8, 2024

This is a small change that is part of a bigger goal to improve our confidence in browser testing and update the codebase to adapt to node/browser environment without throwing errors:

  • adds vitest as the test framework that has browser testing
  • drops karma. eventually drop add-ins like sinon used for mocking and completely build on vitest.
  • updates test imports to use vitest api
  • adds browser testing for the package's abstractions and authentication/azure
  • adds utility function to check the environment(node/browser) the code is running in
  • Fixes browser incompatible code in authentication.azure package (part of Polymorphism of buffer usage #1072). Should update for the rest of the other instances.

Status

The work in this pr is only done on 2 packages, abstractions and authentication/azure. This should give a basis and open discussion of what the end result for the goals above should look like.

  • abstractions package is updated to vitest and has browser tests
  • authentication/azure package is updated to vitest and has a trigger for browser tests that pass
  • authentication/spfx is not updated
  • http is not updated.
  • serialization/* is not updated.

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this long overdue and great work! thanks for taking care of it!

@musale
Copy link
Contributor Author

musale commented Mar 11, 2024

closing in favour of #1102

@musale musale closed this Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants