Unknown option "setupFilesAfterEnv" error when running my test file
See original GitHub issueHey Im using jest-puppeteer (version 4.1.0). when running my tests i got that alert:
Deprecation Warning: “setupTestFrameworkScriptFile” was replaced by configuration “setupFilesAfterEnv”, which supports multiple paths. Please update your configuration.
but when i replace “setupTestFrameworkScriptFile” with: “setupFilesAfterEnv” i get this error:
Unknown option “setupFilesAfterEnv” with value “<rootDir>/reporters/screenshot.js” was found. This is probably a typing mistake. Fixing it will remove this message.
this is my jest.config.js file content:
module.exports = {
preset: 'jest-puppeteer',
globalTeardown: './teardown.js',
reporters: [
'default',
'./reporters/slack',
],
setupFilesAfterEnv: ['<rootDir>/reporters/screenshot.js'],
};
what am i doing wrong here? (probably something stupid that im missing)
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Jest configuration setupFilesAfterEnv option was not found
I have an error with path of setupFilesAfterEnv or transform . the error i get when i run "yarn test" $ jest __testsv2__...
Read more >Configuring Jest
By default, Jest runs all tests and produces all errors into the console upon completion. The bail config option can be used here...
Read more >Jest runner doesn't execute "setupFilesAfterEnv" with Jest 24
A script specified in "setupFilesAfterEnv" is not executed in IDEA the same setup runs ... The tests are run correctly only when all...
Read more >Configuring Vitest
To configure vitest itself, add test property in your Vite config. ... Files to include in the test run, using glob pattern.
Read more >Configuring Jest compiled - w3resource
When you are using the --config option, the JSON file should not contain a ... Jest will run all tests and will produce...
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
@steveswork thanks a lot for your answer! actually when i upgraded jest-cli to latest version it solved the problem…
but thank you anyway 🙏
I had a similar issue that I also wasn’t able to resolve.