Currently, I am in the process of setting up Unit Tests with VueJS 3. After referring to Vue 3's documentation, I went ahead and installed test-utils version 2.0
Checking my package.json file, it appears 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",
...
}
}
Now, when I attempt to run my tests using:
npm run test:unit
I encounter the following error message:
> <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6d19081e191e380304193b18082d5d435c435d">[email protected]</a> test:unit
> vue-cli-service test:unit
ERROR command "test:unit" does not exist.
A similar outcome is obtained with the yarn
command as well. Any suggestions on how to resolve this issue?
PS: Feel free to drop a comment if you require additional information :)