bencodezen / vue-enterprise-boilerplate

An ever-evolving, very opinionated architecture and dev environment for new Vue SPA projects using Vue CLI.
7.77k stars 1.32k forks source link

Run test:unit:file when commit changes #143

Closed knonginda closed 5 years ago

knonginda commented 5 years ago

Hi @chrisvfritz,

I have a testing file in the same root, and the "test:unit task" is working, but when I commit changes and run the "test:unit:file", this task was not working.

src/components/_base-icon.vue src/components/_base-icon.unit.js

No tests found
In /Users/jettl/git/test/applet-plugin-icon-line1
37 files checked.
testMatch: **/(*.)unit.js - 1 match
testPathIgnorePatterns: /node_modules/ - 37 matches
Pattern: /Users/jettl/git/test/applet-plugin-icon-line1/src/components/_base-icon.vue - 0 matches
chrisvfritz commented 5 years ago

Can you provide the exact command you tried? This works for me as expected:

yarn test:unit:file src/components/_base-icon.vue
knonginda commented 5 years ago

Hi @chrisvfritz, The following is what error message shows in the terminal:

✖ npm run test:unit:file found some errors. Please fix them and try committing again.

> @bo/icon-line1@1.0.0 test:unit:file /Users/jettl/git/test/applet-plugin-icon-line1
> npm run test:unit --bail --findRelatedTests "/Users/jettl/git/test/applet-plugin-icon-line1/src/components/_base-icon.vue"

> @bo/icon-line1@1.0.0 test:unit /Users/jettl/git/test/applet-plugin-icon-line1
> vue-cli-service test:unit "/Users/jettl/git/test/applet-plugin-icon-line1/src/components/_base-icon.vue"

No tests found
In /Users/jettl/git/test/applet-plugin-icon-line1
37 files checked.
testMatch: **/(*.)unit.js - 1 match
testPathIgnorePatterns: /node_modules/ - 37 matches
Pattern: /Users/jettl/git/test/applet-plugin-icon-line1/src/components/_base-icon.vue - 0 matches

Thanks

chrisvfritz commented 5 years ago

Is this happening for you with a fresh clone, or only after making specific changes?

chrisvfritz commented 5 years ago

Closing due to inactivity.