Skip to content

@vue/cli-plugin-unit-jest test configuration broken #1795

Closed
@umbertooo

Description

@umbertooo

Version

3.0.0-rc.3

Reproduction link

https://github.com/umbertooo/vue-cli-with-jest-plugin

Steps to reproduce

  1. create project vue create vue-jest-demo, for brevity I post the stored preset:
"vue-with-jest": {
    "useConfigFiles": true,
    "plugins": {
    "@vue/cli-plugin-babel": {},
    "@vue/cli-plugin-eslint": {
        "config": "base",
        "lintOn": [
        "save"
        ]
    },
    "@vue/cli-plugin-unit-jest": {}
    }
}
  1. cd vue-jest-demo
  2. npm run test:unit

What is expected?

I expect the example test tests/unit/HelloWorld.spec.js to be run.

What is actually happening?

> vue-jest-demo@0.1.0 test:unit /Users/myuserhome/vue-jest-demo
> vue-cli-service test:unit

No tests found
In /Users/myuserhome/vue-jest-demo
  11 files checked.
  testMatch: /Users/myuserhome/vue-jest-demo/(tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)) - 0 matches
  testPathIgnorePatterns: /node_modules/ - 11 matches
Pattern:  - 0 matches
ERROR  jest exited with code 1.

This repo contains the project I created following the steps above: https://github.com/umbertooo/vue-cli-with-jest-plugin
Just run npm run test:unit

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