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 #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.
[x] abstractions package is updated to vitest and has browser tests
[x] authentication/azure package is updated to vitest and has a trigger for browser tests that pass
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:
abstractions
andauthentication/azure
authentication.azure
package (part of #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 testsauthentication/azure
package is updated to vitest and has a trigger for browser tests that passauthentication/spfx
is not updatedhttp
is not updated.serialization/*
is not updated.