Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

347
Views
VueJS Unit testing - I cannot run my tests. "Command 'test/unit' does not exists"

I'm trying to setup Unit Tests with VueJS 3. Reading the docs of Vue 3, I Installed test-utils 2.0

My package.json file looks like this :

{
  "name": "testsUnitVue",
  "version": "0.1.0",
  "private": true,
  "scripts": {

    ...

    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "test:unit": "vue-cli-service test:unit",
    "lint": "vue-cli-service lint",

    ...

  },
  "dependencies": {
    ...
  },
  "devDependencies": {

    ...

    "@vue/test-utils": "^2.0.0-rc.21",

    ...

  }
}

I try to run my the tests with:

npm run test:unit

But I've the following error message:

> testsUnitVue@0.1.0 test:unit
> vue-cli-service test:unit

 ERROR  command "test:unit" does not exist.

I've a similar result with yarn command. How can I solve this?

PS: If you need more informations, then just leave a comment :)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The @vue/test-utils does not provide the unit:test subcommand of vue-cli-service. Those are available when using one of the following plugins:

  • https://cli.vuejs.org/core-plugins/unit-jest.html
  • https://cli.vuejs.org/core-plugins/unit-mocha.html

For instructions on how to install those see: https://cli.vuejs.org/guide/plugins-and-presets.html#installing-plugins-in-an-existing-project

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!