Code-Pop / Unit-Testing-Vue2

Repo for Vue Mastery's Unit Testing course
76 stars 59 forks source link

Unit testing failing #2

Open AltFreq07 opened 3 years ago

AltFreq07 commented 3 years ago

npm run test:unit

unit-testing-vue@0.1.0 test:unit vue-cli-service test:unit

FAIL tests/unit/AppHeader.spec.js ● Test suite failed to run

[BABEL] /home/altfreq/Workspace/VueTutorials/Unit-Testing/tests/unit/AppHeader.spec.js: No "exports" main defined in /home/altfreq/Workspace/VueTutorials/Unit-Testing/node_modules/@babel/helper-compilation-targets/package.json (While processing: "/home/altfreq/Workspace/VueTutorials/Unit-Testing/node_modules/@vue/cli-plugin-babel/preset.js")

  at new NodeError (node:internal/errors:278:15)
  at throwExportsNotFound (node:internal/modules/esm/resolve:321:9)
  at packageExportsResolve (node:internal/modules/esm/resolve:546:3)
  at resolveExports (node:internal/modules/cjs/loader:467:36)
  at Function.Module._findPath (node:internal/modules/cjs/loader:507:31)
  at Function.Module._resolveFilename (node:internal/modules/cjs/loader:905:27)
  at Function.Module._load (node:internal/modules/cjs/loader:763:27)
  at Module.require (node:internal/modules/cjs/loader:991:19)
  at require (node:internal/modules/cjs/helpers:92:18)
  at Object.<anonymous> (node_modules/@babel/preset-env/lib/debug.js:8:33)

Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 1.461s Ran all test suites. npm ERR! code 1 npm ERR! path /home/altfreq/Workspace/VueTutorials/Unit-Testing npm ERR! command failed npm ERR! command sh -c vue-cli-service test:unit

npm ERR! A complete log of this run can be found in: npm ERR! /home/altfreq/.npm/_logs/2020-12-08T03_00_33_028Z-debug.log

AltFreq07 commented 3 years ago

Required npm update @vue/cli-plugin-babel to fix if anyone else gets blocked