setupTestFrameworkScriptFile option is missing
See original GitHub issueHello!
There is a convention to autoload src/setupTests.js
file to set up the test environment, but it doesn’t allow to load extra matchers for Jasmine.
I have some library with good extra matchers like jasmine-enzyme and it is supposed to be included as setupTestFrameworkScriptFile
, which it not possible to do now.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Module in the setupTestFrameworkScriptFile option was not ...
Despite specifying file in files section of wallaby.js, the setup module 'test/local/setup-local' is not copied to the cache (or so it seems).
Read more >Option "setupTestFrameworkScriptFile" was replaced by ...
I renamed my jest.config.js to setUpTests.js however that did not remove the deprecated error warning. import { configure } from 'enzyme ...
Read more >Configuring Jest
This option tells Jest that all imported modules in your tests should ... If the file specified by path is not found, an...
Read more >Configuring package.json · Jest
Jest's configuration can be defined in the package.json file of your project or through the --config <path/to/json> option.
Read more >jest-preset-angular - npm
It can be mitigated via Angular compiler by setting preserveWhitespaces: ... JSDOM missing transform property when using Angular Material, ...
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 Free
Top 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
I think so. It would be more helpful when
setupTests.js
will behave likesetupTestFrameworkScriptFile
.As a user, I don’t see any use case to run some code before test framework. Usually, I need to set up something via API that framework provides (which definitely should be after framework init), or mocking some global APIs, like
localStorage
in the example in documentation which also can be done regardless test framework initialization.Yes, I can do. I already did some related commits into my fork https://github.com/just-boris/create-react-app/commit/27d99d1613139d5d9a6fe334c43b5e26cc2e47d3 I will update it to actual state and will send a PR