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

No tests found after installing buefy #1694

Closed
tony19 opened this issue Jun 27, 2018 · 3 comments
Closed

No tests found after installing buefy #1694

tony19 opened this issue Jun 27, 2018 · 3 comments

Comments

@tony19
Copy link
Contributor

tony19 commented Jun 27, 2018

Version

3.0.0-rc.3

Reproduction link

https://github.com/tony19/vue-cli-broken-tests-demo.git

Steps to reproduce

Run the following commands:

vue create vue-test2
# and enable unit tests at prompt
cd vue-test2
npm i -S buefy
npm run test:unit

What is expected?

The unit tests run without error

What is actually happening?

An error:

➜  vue-test2 git:(master) ✗ npm run test:unit

> [email protected] test:unit /Users/tony/src/tmp/vue-test2
> vue-cli-service test:unit

No tests found
In /Users/tony/src/tmp/vue-test2
  11 files checked.
  testMatch: /Users/tony/src/tmp/vue-test2/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)) - 0 matches
  testPathIgnorePatterns: /node_modules/ - 11 matches
Pattern:  - 0 matches
 ERROR  jest exited with code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit: `vue-cli-service test:unit`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log

The contents of /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/tony/n/bin/node',
1 verbose cli   '/Users/tony/n/bin/npm',
1 verbose cli   'run',
1 verbose cli   'test:unit' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'pretest:unit', 'test:unit', 'posttest:unit' ]
5 info lifecycle [email protected]~pretest:unit: [email protected]
6 info lifecycle [email protected]~test:unit: [email protected]
7 verbose lifecycle [email protected]~test:unit: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~test:unit: PATH: /Users/tony/n/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/tony/src/tmp/vue-test2/node_modules/.bin:/Users/tony/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/tony/n/bin
9 verbose lifecycle [email protected]~test:unit: CWD: /Users/tony/src/tmp/vue-test2
10 silly lifecycle [email protected]~test:unit: Args: [ '-c', 'vue-cli-service test:unit' ]
11 silly lifecycle [email protected]~test:unit: Returned: code: 1  signal: null
12 info lifecycle [email protected]~test:unit: Failed to exec test:unit script
13 verbose stack Error: [email protected] test:unit: `vue-cli-service test:unit`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/Users/tony/n/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack     at EventEmitter.emit (events.js:182:13)
13 verbose stack     at ChildProcess.<anonymous> (/Users/tony/n/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:182:13)
13 verbose stack     at maybeClose (internal/child_process.js:961:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/tony/src/tmp/vue-test2
16 verbose Darwin 17.6.0
17 verbose argv "/Users/tony/n/bin/node" "/Users/tony/n/bin/npm" "run" "test:unit"
18 verbose node v10.5.0
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] test:unit: `vue-cli-service test:unit`
22 error Exit status 1
23 error Failed at the [email protected] test:unit script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

A workaround is to delete and reinstall node_modules. Note that installing the project from scratch after a git clone does not reproduce the problem. The issue happens specifically after installing buefy after creating a Vue project from the cli.


Environment

  • node 10.5.0
  • npm 6.1.0
  • macOS High Sierra 10.13.5
  • MacBook Pro
Full command output
➜  tmp vue create vue-test2

Vue CLI v3.0.0-rc.3
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, Linter, Unit
? Pick a linter / formatter config: Basic
? Pick additional lint features: Lint on save
? Pick a unit testing solution: Jest
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedica
ted config files
? Save this as a preset for future projects? No

Vue CLI v3.0.0-rc.3
✨ Creating project in /Users/tony/src/tmp/vue-test2.
🗃 Initializing git repository...
⚙ Installing CLI plugins. This might take a while...

yarn install v1.7.0
info No lockfile found.
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...

success Saved lockfile.
✨ Done in 33.19s.

🚀 Invoking generators...
📦 Installing additional dependencies...

yarn install v1.7.0
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...

success Saved lockfile.
✨ Done in 4.32s.

⚓ Running completion hooks...

🎉 Successfully created project vue-test2.
👉 Get started with the following commands:

$ cd vue-test2
$ yarn serve

➜ tmp cd vue-test2
➜ vue-test2 git:(master) npm i -S buefy
npm WARN deprecated [email protected]: 1.2.0 should have been a major version bump

[email protected] uninstall /Users/tony/src/tmp/vue-test2/node_modules/yorkie
node bin/uninstall.js

husky
uninstalling Git hooks
done

npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/jest as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/jest
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/uglifyjs as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/uglify-js
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/regjsparser as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/regjsparser
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/nopt as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/nopt
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/jsesc as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/jsesc
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/esparse as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/esprima
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/esvalidate as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/esprima
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/browserslist as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/browserslist
npm WARN rm not removing /Users/tony/src/tmp/vue-test2/node_modules/.bin/babylon as it wasn't installed by /Users/tony/src/tmp/vue-test2/node_modules/babylon

[email protected] install /Users/tony/src/tmp/vue-test2/node_modules/fsevents
node install

[fsevents] Success: "/Users/tony/src/tmp/vue-test2/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

[email protected] install /Users/tony/src/tmp/vue-test2/node_modules/yorkie
node bin/install.js

setting up Git hooks
done

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

  • [email protected]
    added 234 packages from 56 contributors, removed 89 packages, updated 1245 packages and audited 72619 packages in 47.473s
    found 0 vulnerabilities

➜ vue-test2 git:(master) ✗ npm run test:unit

[email protected] test:unit /Users/tony/src/tmp/vue-test2
vue-cli-service test:unit

No tests found
In /Users/tony/src/tmp/vue-test2
11 files checked.
testMatch: /Users/tony/src/tmp/vue-test2/(tests/unit//*.spec.(js|jsx|ts|tsx)|/tests/*.(js|jsx|ts|tsx)) - 0 matches
testPathIgnorePatterns: /node_modules/ - 11 matches
Pattern: - 0 matches
ERROR jest exited with code 1.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] test:unit: vue-cli-service test:unit
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/tony/.npm/_logs/2018-06-27T20_17_10_928Z-debug.log

@trashpanda001
Copy link
Contributor

I've encountered something similar, I believe this may be a Jest 23.2.0 bug. See jestjs/jest#6546

@tony19
Copy link
Contributor Author

tony19 commented Jun 28, 2018

@sickp Thanks, I'll watch that issue.

@tony19 tony19 closed this as completed Jun 28, 2018
@tony19
Copy link
Contributor Author

tony19 commented Jun 28, 2018

duplicate of #1686

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