behaviour of `test:unit --watch` changed?
See original GitHub issueVersion
3.0.0-beta.11
Reproduction link
https://github.com/doppelreim/vue-test-app/tree/test-watch-behaviour
Steps to reproduce
Install dependencies: npm install
Run the unit-tests in “watch-mode”: ./node_modules/.bin/vue-cli-service test:unit --watch
After they have passed, open “Other.spec.ts” and change something. For example, change the expectation from 8 to 7.
Save the file.
The tests are run again, automatically (because of --watch
)
What is expected?
At least in beta6, only the tests contained in the file that changed are run again.
What is actually happening?
In beta12, all tests are run again.
I’m not sure, what the actually intended behaviour is. Maybe it should always have been like this. But it is different 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Behaviour Driven Unit Tests - Luke Merrett
Behaviour Driven Unit Tests. "If we change the implementation details, none of our tests should break" - Ian Cooper.
Read more >Behavior Driven Unit Testing And Integration Testing
This week we explore the benefits of integration tests and unit tests, and how they fit into your behavior-driven development workflow.
Read more >Unit Testing Behavior of React Components with Test-Driven ...
How to unit test more complex React components with Jest and Enzyme using a test-driven development (TDD) approach.
Read more >Unit Testing Tutorial – What is, Types & Test Example - Guru99
Unit Test cases should be independent. In case of any enhancements or change in requirements, unit test cases should not be affected. Test...
Read more >Behavioral Testing of ML Models (Unit tests for machine ...
How can we empower machine learning models with powerful software engineering techniques like unit testing ?Evaluating ML models using a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just added
"test:unit:watch": "vue-cli-service test:unit --watch"
to thescripts
section in mypackage.json
, works like a charm.Old issue, but maybe some lone googler can use this: For me running
npm run test:unit -- --watch
works as expected on a newly instantiated project.See https://docs.npmjs.com/cli/run-script