kentcdodds / testing-workshop

A workshop for learning how to test JavaScript applications
http://git.io/testing-workshop
1.36k stars 708 forks source link

Failed test after running client editor test #79

Closed huchenme closed 6 years ago

huchenme commented 6 years ago

Seem this error after running npm run test:client

 FAIL   client  client/src/screens/__tests__/editor.todo.js
  ● Test suite failed to run

    Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it islikely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel. (While processing preset: "/Users/huchenme/playground/testing-workshop/client/node_modules/babel-preset-react-app/index.js")

It is working if I downgrade react-scripts to version1

kentcdodds commented 6 years ago

Hi @huchenme, thank you for the issue! I'm not able to reproduce it however :-/

If you figure out anything else about this or discover a way to reproduce it and have a suggested fix, then please comment here and we can work it out. Thanks!

weiklr commented 6 years ago

Hi @kentcdodds,

I had the same problem too. I fixed it after installing a devDependency in client/package.json:

babel-preset-react-app: "^3.1.2"
kentcdodds commented 6 years ago

Is this something that you see happens when you're in the fem-2018 branch? Or the master branch? Or both?

weiklr commented 6 years ago

it's on bothfem-2018 and master branch

kentcdodds commented 6 years ago

Ok, thanks. Would you like to make a PR for each branch to fix this?

weiklr commented 6 years ago

Sure! I will post the PR soon.

On Tue, 26 Jun 2018, 1:41 AM Kent C. Dodds, notifications@github.com wrote:

Ok, thanks. Would you like to make a PR for each branch to fix this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kentcdodds/testing-workshop/issues/79#issuecomment-400035375, or mute the thread https://github.com/notifications/unsubscribe-auth/AHhdYfUmKrHpVkfpt0IgrQqOjFwW22foks5uASC3gaJpZM4UPUMj .