Skip to content

Commit fb0c917

Browse files
docs(README): npm test watches files for changes
1 parent fe52eca commit fb0c917

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,17 @@ The easiest way to run the unit tests is to use the supplied npm script:
105105
npm test
106106
```
107107

108-
This script will start the Karma test runner to execute the unit tests.
108+
This script will start the Karma test runner to execute the unit tests. Moreover, Karma will sit and
109+
watch the source and test files for changes and then re-run the tests whenever any of them change.
110+
This is the recommended strategy; if you unit tests are being run every time you save a file then
111+
you receive instant feedback on any changes that break the expected code functionality.
109112

110-
We can also have Karma sit and watch the application and test files for changes and re-run the
111-
tests whenever any of them change. You can do this with:
113+
You can also ask Karma to do a single run of the tests and then exit. This is useful if you want to
114+
check that a particular version of the code is operating as expected. The project contains a
115+
predefined script to do this:
112116

113117
```
114-
npm run test-watch
118+
npm run test-single-run
115119
```
116120

117121

0 commit comments

Comments
 (0)