Vue-cli: Process Hangs When Invoking `vue-cli-service test:unit` with Jest

Created on 2 Jun 2018  Â·  12Comments  Â·  Source: vuejs/vue-cli

Version

3.0.0-beta.15

Reproduction link

https://github.com/jbenner-radham/vue-cli-jest-test

Steps to reproduce

Via the CLI:

  1. vue create <app-name>
  2. Select "Manually select features"
  3. Select "Babel", "Linter / Formatter", and "Unit Testing"
  4. Select "ESLint with error prevention only"
  5. Select "Lint on save" and "Lint and fix on commit"
  6. Select "Jest"
  7. Select "In dedicated config files"
  8. Enter "n"
  9. cd <app-name>
  10. yarn test:unit

What is expected?

The unit tests to run and complete successfully.

What is actually happening?

The test service hangs indefinitely e.g.

➜  vue-cli-jest-test git:(master) yarn test:unit
yarn run v1.7.0
$ vue-cli-service test:unit
cannot reproduce

Most helpful comment

Or better, on OSX:
brew uninstall watchman
brew install watchman

After I was able to run the tests normally again:
yarn test:unit

All 12 comments

Can't reproduce - can you provide your OS / Node / package manager information?

Sure thing.

  • MacOS Sierra v10.12.6
  • Node.js v10.3.0 _(installed via Homebrew)_
  • Yarn v1.7.0 _(installed via npm)_

Closing stale issues that cannot be reproduced.

@jbenner-radham I have the same problem with

  • vue-cli 3.0.0
  • node 8.11.3 (installed via nvm)
  • yarn 1.9.4 (installed via homebrew)
  • MacOS High Sierra 10.13.6

Did you finally got a solution for this problem?

@bierik Nope, I'm afraid not. Sorry.

Same problem. yarn test:unit runs indefinitely

Tried: reinstalling node modules, clearing node modules cache, different yarn, node, npm and vue-cli versions.
We've tried copying the node_modules of a computer where the unit tests are running. No success.

  • vue-cli 3.1.1
  • node 8.12.0 and 9.11.2 (installed via nvm)
  • yarn 1.12.1 (installed via homebrew)
  • MacOS High Sierra 10.13.6

Tests are running on my co-workers computer, he has the same versions apart from the OS (he's running Mojave 10.14.1)

Update:
Updating to OS Mojave didn't matter either (longshot)

yarn test:unit --no-watchman fixes it for me

Or better, on OSX:
brew uninstall watchman
brew install watchman

After I was able to run the tests normally again:
yarn test:unit

Reinstalling watchman worked for me too, thanks!

Bump, plus reinstalling fixed it for me as well.

Oh confused until found this issue, since I clicked "No" when it prompted a request from watchman in one second, didn't know what it was.

"Reinstalling the watchman" works for me
-- https://github.com/vuejs/vue-cli/issues/1435#issuecomment-443639367

i'm having this issue on ubuntu 12.04 it is also related to watchman or something similar ?

Was this page helpful?
0 / 5 - 0 ratings