Skip to content

Vue testing library depends on vuex and vue-router types #187

Closed
@sapagat

Description

@sapagat

Hi there! For my surprise importing the @testing-library/vue module raises a compilation error due to a dependency with vue-router and vuex.

 ERROR  Failed to compile with 2 errors

These dependencies were not found:

* vue-router in ./node_modules/@testing-library/vue/dist/vue-testing-library.js
* vuex in ./node_modules/@testing-library/vue/dist/vue-testing-library.js

To install them, you can run: npm install --save vue-router vuex
  [=========================] 100% (completed)

 WEBPACK  Failed to compile with 2 error(s)

Error in ./node_modules/@testing-library/vue/dist/vue-testing-library.js

  Module not found: 'vue-router' in '/home/sam/sandbox/opencocos/app/node_modules/@testing-library/vue/dist'

Error in ./node_modules/@testing-library/vue/dist/vue-testing-library.js

  Module not found: 'vuex' in '/home/sam/sandbox/opencocos/app/node_modules/@testing-library/vue/dist'

I've tried installing both dependencies and test pass, but I believe it shouldn't be mandatory in order to run tests, right?

Notice: I'm not using Jest. I'm running tests with Mocha.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions