Add an option to run tests in watch mode

Also add some explanations on how to run tests for a specific exercise only.
This commit is contained in:
Hugo Saracino 2020-12-08 16:51:32 +01:00 committed by Hugo Saracino
parent 7c264c8f29
commit b98e2a673e
2 changed files with 14 additions and 2 deletions

View file

@ -11,5 +11,16 @@ To run the tests, simply run
$ yarn test $ yarn test
``` ```
You can also run them in watch mode:
```sh
$ yarn test:watch
```
Finally, if you wish to only run the tests for a given exercice `exoN`, you can
run the following:
```sh
$ yarn test[:watch] exoN
```
The exercices are organized into `exoN` folders and most of what is required to The exercices are organized into `exoN` folders and most of what is required to
complete each is detailed in the comments. complete each is detailed in the comments.

View file

@ -12,7 +12,8 @@
"homepage": "https://github.com/inato/fp-ts-training", "homepage": "https://github.com/inato/fp-ts-training",
"scripts": { "scripts": {
"build": "yarn tsc -b", "build": "yarn tsc -b",
"test": "jest --runInBand" "test": "jest --runInBand",
"test:watch": "jest --runInBand --watch"
}, },
"dependencies": { "dependencies": {
"decod": "^6.1.6", "decod": "^6.1.6",