Skip to content

can't locally run tests due to the vue-test-utils dependency #107

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

Closed
justinhelmer opened this issue Oct 3, 2018 · 0 comments
Closed

can't locally run tests due to the vue-test-utils dependency #107

justinhelmer opened this issue Oct 3, 2018 · 0 comments

Comments

@justinhelmer
Copy link
Contributor

justinhelmer commented Oct 3, 2018

The problem

I want to contribute to support the new babel 7 suggested babel.config.js file, and related options (i.e. root). I opened an issue (#110) and PR (#111) related to this, but I had to make this change locally before running tests.

This project's test suite relies on vue-test-utils. Tracing the dependency to this repo's package.json, you can see it points to the master branch of vue-test-utils. The current tip of master has no index.js, and no main entry in it's package.json. Therefore, npm has no way to resolve the dependency. Running the tests results in the following:

$ npm run test             

> [email protected] test /Volumes/workspace/vue-jest
> npm run lint && ./test.sh


> [email protected] lint /Volumes/workspace/vue-jest
> eslint lib vue-jest.js test

yarn run v1.6.0
$ jest test --no-cache --runInBand --coverage --coverageDirectory test/coverage
 FAIL  test/scss.spec.js
  ● Test suite failed to run

    Cannot find module 'vue-test-utils' from 'scss.spec.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (test/scss.spec.js:1:123)

 FAIL  test/sass.spec.js
  ● Test suite failed to run

    Cannot find module 'vue-test-utils' from 'sass.spec.js'

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
      at Object.<anonymous> (test/sass.spec.js:1:123)

# ... more fails for the same reason. Output cut short for the sake of brevity

The solution

Use the published version of @vue/test-utils, and update the tests to support the new API (current version is @vue/[email protected])

@justinhelmer justinhelmer changed the title can't contribute due to the vue-test-utils dependency can't locally run tests due to the vue-test-utils dependency Oct 3, 2018
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

1 participant