Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests are failing #9

Open
dnltsk opened this issue Mar 12, 2018 · 1 comment
Open

tests are failing #9

dnltsk opened this issue Mar 12, 2018 · 1 comment

Comments

@dnltsk
Copy link

dnltsk commented Mar 12, 2018

I cloned the repo, run npm install and npm test a.

resultet in

 RUNS  src/App.test.js
/Users/dnltsk/projects/express-react-starter/node_modules/react-scripts/scripts/test.js:22
  throw err;
  ^

TypeError: Network request failed
    at XMLHttpRequest.xhr.onerror (/Users/dnltsk/projects/express-react-starter/node_modules/whatwg-fetch/fetch.js:436:16)
    at XMLHttpRequest.callback.(anonymous function) (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:289:32)
    at invokeEventListeners (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:219:27)
    at invokeInlineListeners (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:166:7)
    at EventTargetImpl._dispatch (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:122:7)
    at EventTargetImpl.dispatchEvent (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:87:17)
    at XMLHttpRequest.dispatchEvent (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/generated/EventTarget.js:61:35)
    at XMLHttpRequest.abort (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:405:16)
    at Object.abort (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/xhr-utils.js:315:13)
    at RequestManager.close (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:146:21)
    at Window.close (/Users/dnltsk/projects/express-react-starter/node_modules/jsdom/lib/jsdom/browser/Window.js:362:29)
    at JSDOMEnvironment.dispose (/Users/dnltsk/projects/express-react-starter/node_modules/jest-environment-jsdom/build/index.js:44:19)
    at Promise.resolve.then (/Users/dnltsk/projects/express-react-starter/node_modules/jest/node_modules/jest-cli/build/runTest.js:102:17)
    at <anonymous>
npm ERR! Test failed.  See above for more details.

Using npm 5.6.0, node v9.4.0, High Sierra

Whats wrong?

@shuttle1987
Copy link

fetch doesn't exist in node, you will need to install something like isomorphic-fetch to deal with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants