This is a new issue to aggregate existing issues for supporting create-react-app and react-scripts. The latest node LTS version doesn't install Jest where it's currently expected (in src/helpers.ts). This seems to be the cause of #39, #41, #113, and #125.
--
node -v: 8.9.0npm -v: 5.5.1npm ls react-scripts (if you haven鈥檛 ejected): N/AOperating system: Windows 7
Extension version: v2.4.1 as of 23af6f0
The create-react-app User Guide has a section for Updating to New Releases. Instead of installing newer versions of react-scripts, I've used this approach to bootstrap app with each supported version (>= v1.0.0) and confirm the extension doesn't work.
create-react-app app
cd app
npm uninstall react-scripts
npm install "react-scripts@<version>"
code --extensionDevelopmentPath=<...\vscode-jest> .
The extension should detect the bootstrapped app.
An "Unexpected token" error is thrown when Jest runs without detecting this has been bootstrapped.
react-scripts in node_modules/.bin/react-scripts(.cmd)?I'm getting the Unexpected token error on JSX using react-scripts 1.1.4. Setting jest.pathToJest to npm test -- as a workaround fixes it, but shouldn't it be automatic?
@nickmccurdy thanks for the workaround. @orta this still seems to be an issue BTW, the test runner is using jest directly, instead of going through react-scripts.
Most helpful comment
I'm getting the
Unexpected tokenerror on JSX usingreact-scripts1.1.4. Settingjest.pathToJesttonpm test --as a workaround fixes it, but shouldn't it be automatic?