Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
docs(README): npm test watches files for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Mar 28, 2014
1 parent fe52eca commit fb0c917
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,17 @@ The easiest way to run the unit tests is to use the supplied npm script:
npm test
```

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

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

```
npm run test-watch
npm run test-single-run
```


Expand Down

0 comments on commit fb0c917

Please sign in to comment.