npm test fails
See original GitHub issueHi, great library! Unfortunately npm test is failing for me, running on Mac OS X High Sierra.
I’ve tried removing node_modules and doing an npm install. No dice. Looks like the path is wrong in package.json.
FAIL src/App.test.js
● Test suite failed to run
ENOENT: no such file or directory, stat '/Users/john/dev/drizzle/\config\polyfills.js'
at Error (native)
at Object.fs.statSync (fs.js:981:18)
at Object.statSync (node_modules/graceful-fs/polyfills.js:297:22)
Test Suites: 1 failed, 1 total
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
NPM ERR! Test failed - Not able to run test - Stack Overflow
NPM ERR ! Test failed and worker process has quit unexpectedly! Most likely this is an initialization error. Here is part of the...
Read more >Npm build and npm test fail with TypeError and or multiple errors
Both npm run build and npm run test fail with a TypeError or multiple other errors in my local vanilla clone of the...
Read more >console-fail-test - npm
Gently fails test runs if the console was used during them. ... Start using console-fail-test in your project by running `npm i ...
Read more >Jest fails as part of npm build - Visual Studio Feedback
I have an npm project that uses jest to run unit tests. I have a cloud build definition that runs a sequence of...
Read more >Failed: npm test -t db-connection - M220JS - MongoDB
Determining test suites to run…Setup Mongo Connection FAIL test/db-connection.test.js ○ Test suite failed to run
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 FreeTop 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
Top GitHub Comments
Here’s what I changed in package.json to get the test to pass:
Line 76
"<rootDir>/config/polyfills.js"
Lines 85-86
"^.+/.css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*/.(js|jsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
I was still getting a “Cannot find module” error until I added <rootDir> to those lines.
This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.