kentcdodds/testing-workshop

jest is not starting

aditya81070 opened this issue · 3 comments

Environment info:

  • node version (node --version): v10.17.0
  • npm version (npm --version): 6.11.3
  • yarn version (yarn --version): 1.19.2

Problem description:

I am following the jest setup video of the course Testing React applications, v2 at frontend masters'. I have written the test script in my package.jsonand trying to runnpm test` command. But jest is showing that there are two configurations. I don't understand that. I tried to find solutions on google search but couldn't found.

Here is the output. Please help so I can continue the setup.

npm test                                                             ✔

> calculator.solution@1.0.0 test /home/neo/frontend-masters/testing-workshop/other/configuration/calculator
> jest

 FAIL  src/__tests__/utils.js
  ● Test suite failed to run

    Multiple configuration files found. Please remove one:
     - package.json
     - .babelrc.js
    from /home/neo/frontend-masters/testing-workshop/other/configuration/calculator

      at names.reduce (node_modules/@babel/core/lib/config/files/configuration.js:133:13)
          at Array.reduce (<anonymous>)
      at loadOneConfig (node_modules/@babel/core/lib/config/files/configuration.js:127:24)
      at findRelativeConfig (node_modules/@babel/core/lib/config/files/configuration.js:102:16)
      at buildRootChain (node_modules/@babel/core/lib/config/config-chain.js:113:39)
      at loadPrivatePartialConfig (node_modules/@babel/core/lib/config/partial.js:85:55)
      at loadPartialConfig (node_modules/@babel/core/lib/config/partial.js:110:18)
      at ScriptTransformer._getCacheKey (node_modules/@jest/transform/build/ScriptTransformer.js:266:23)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        1.967s
Ran all test suites.
npm ERR! Test failed.  See above for more details.

Suggested solution:

I found the solution in closed issues. Thanks

In which issue did you find the solution @aditya81070 ?

@polaroidkidd If you or anyone else are here with

Multiple configuration files found issue

then please visit issue #106 or in short, install previous version of jest@23.6.0.