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.

setupTests.js entry missing after eject

See original GitHub issue

This is how the setupFiles section looks after ejecting:

    "setupFiles": [
      "<rootDir>/config/polyfills.js"
    ],

In previous version:

    "setupFiles": [
      "<rootDir>/config/polyfills.js",
      "<rootDir>/src/setupTests.js"
    ], 

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
christopherdbullcommented, Oct 15, 2017

Could I suggest this being added to the documentation somewhere? Happy to do it if you tell me where. I’ve just spent the last couple of days bashing my head against the desk wonder why setupTests wasn’t running in my ejected app…

0reactions
dannycallericommented, Dec 28, 2017

Hi @gaearon , I was struggling as @te-chris was for this issue. I think that including unconditionally isn’t the right decision, but writing it in the doc would be really helpful, I made a PR here: https://github.com/facebookincubator/create-react-app/pull/3656

I wasted almost one day 😦 , then I found this thread

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enzyme expects an adapter to be configured - Stack Overflow
Inside setupTests.js is the following: import { configure } from "enzyme"; import Adapter ...
Read more >
How To Set Up a React Project with Create React App
Tutorial Series: How To Code in React.js ... control over your code but ejecting the project from the Create React App integrated toolchain....
Read more >
react_sevenwonders - npm
Alternatives to Ejecting; Something Missing? ... Read instructions below for using assets from JavaScript and HTML.
Read more >
Running Tests | Create React App
For example, if App.test.js and App.js are in the same folder, ... in mind that if you decide to "eject" before creating src/setupTests.js...
Read more >
Don't eject your Create React App | by Adam Laycock - Medium
“Create-React-App is missing a feature that I need, ... If you disagree with my opinions on ejecting in this article, I'd love to...
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