jest-community / vscode-jest

The optimal flow for Jest based testing in VS Code
MIT License
2.83k stars 290 forks source link

Jest extension fails after reinstalling npm modules #100

Open Marius-Stroe opened 7 years ago

Marius-Stroe commented 7 years ago

Jest extension stops working after reinstalling npm modules. I'm using MacOS Sierra, VSCode 1.11.2 and

$ create-react-app -V
1.2.1
$ npm -v
3.10.10
$ node -v
v6.9.5

Steps to reproduce:

 FAIL  src/App.test.js

  ● Test suite failed to run

    /Users/mstroe/workspace/personal/yo/src/App.test.js: Unexpected token (7:18)
        5 | it('renders without crashing', () => {
        6 |   const div = document.createElement('div');
      > 7 |   ReactDOM.render(<App />, div);
          |                   ^
        8 | });
        9 | 

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.051s
Ran all test suites.

Any help is appreciated in getting Jest extension working back with VSCode. Thanks.

(*) Sometimes I have to reopen VSCode twice for this to happen. Let's say a maximum of 5 reopens would trigger the issue.

Marius-Stroe commented 7 years ago

Could it be because the Jest VSCode extension was not "deployed"?

Thoughts? Thanks!

orta commented 7 years ago

yeah, it's blocked on the next release of Jest

Marius-Stroe commented 7 years ago

Thanks, @orta. Do you know when Jest will have another release? I think it's been a month since the facebook/jest#3212 fix got merged? Thanks!

nickserv commented 6 years ago

react-scripts has been using Jest 20 and newer so this should be supported, but I'm still having issues with the latest versions of these packages (but react-scripts pins Jest to 20.0.4). Any ideas?