Skip to content

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

Closed
@The4thLaw

Description

@The4thLaw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions