Test suite failed to run
See original GitHub issueLibrary versions
react-aad-msal
: ^2.3.2msal
: ^1.2.1
Describe the bug
When I run npm run test
I get an error:
● Test suite failed to run
ReferenceError: regeneratorRuntime is not defined
30 | }
31 |
> 32 | export const authProvider = new MsalAuthProvider(config, authenticationParameters, options) ^
Expected behavior
When I run tests, I don’t expect an error. My tests should just run successfully. I should note that failing tests are testing components which import the authProvider file. (I add some additional functionality in there to complete partially applied axios requests with bearer tokens from the acquireTokenSilent
).
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
jest: Test suite failed to run, SyntaxError: Unexpected token ...
Jest sets the env variable to test, so I had to add my presets to the env setting in .babelrc: { "plugins": ["syntax-dynamic-import", ......
Read more >Jest test suite failed to run with v6.4.1 · Issue #1186 - GitHub
Jest test suites failed to run after upgrading log4js to v6.4.1 that uses steamroller. Test suite failed to run TypeError: Cannot read property...
Read more >M220JS Chapter0 - Test suite failed to run - MongoDB
Hi, I am trying to run the first test npm test -t db-connection Here is the response I get: > server@1.0.0 test >...
Read more >test suite failed to run jest encountered an unexpected token ...
test suite failed to run jest encountered an unexpected token jest failed to parse a file. this happens e.g. when your code or...
Read more >How I Fixed The Unexpected Token Error In Jest
To put this in different terms, I'm using Jest to test a package ... So for the Jest tests to run, it first...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just add
import "regenerator-runtime";
to the file and it should solve the problem.So, what is the solution? how should look like setupTests.js file?