Skip to content

Part of the installation steps are not needed if you use @vue/cli-plugin-unit-jest #1776

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
The4thLaw opened this issue Jan 28, 2021 · 2 comments · Fixed by #1778
Closed
Labels

Comments

@The4thLaw
Copy link
Contributor

Documentation Feedback

The installation guide suggests using @vue/cli-plugin-unit-jest to run Jest tests. However, it goes on to list steps that are covered by that plugin (at least as of v4.5.0), such as :

  • Installing dependences like vue-jest, @babel/core, babel-jest... which are transitive dependencies of @vue/cli-plugin-unit-jest. I come from the Maven world so I'm not sure what the practice is in npm but I would tend not to redeclare those dependencies.
  • Setting up the moduleFileExtensions, moduleNameMapper and transform options, which are already set up by using preset: '@vue/cli-plugin-unit-jest'. That option is part of the default configuration after a call to vue add unit-jest, so it works out of the box.

My suggestion would be to have a section containing the instructions for manual setup and one for the instruction which are applicable in all cases (like the Code Coverage section).

Affected documentation page: https://vue-test-utils.vuejs.org/installation/#using-vue-test-utils-with-jest-recommended

@afontcu
Copy link
Member

afontcu commented Jan 28, 2021

Hi! Yeah, we should clearly state if you use the vue-cli plugin there's no need to configure anything else 👍

Fancy to set up a PR fixing it? 😄

@The4thLaw
Copy link
Contributor Author

Sure, I'll find time to submit something :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants