question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setupTestFrameworkScriptFile option is missing

See original GitHub issue

Hello! 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:closed
  • Created 7 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
just-boriscommented, Oct 3, 2016

I think so. It would be more helpful when setupTests.js will behave like setupTestFrameworkScriptFile.

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.

1reaction
just-boriscommented, Oct 4, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found