Update 'README.md'
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
b7866113f0
commit
6aaf0533d7
1 changed files with 43 additions and 1 deletions
44
README.md
44
README.md
|
@ -65,7 +65,49 @@ $ npm test
|
||||||
1 passing (3ms)
|
1 passing (3ms)
|
||||||
```
|
```
|
||||||
|
|
||||||
# Assertions
|
# Watch
|
||||||
|
|
||||||
|
You can also run eltro in watch mode. Update your package.json and add the following:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
/* ... */
|
||||||
|
"scripts": {
|
||||||
|
"test": "eltro",
|
||||||
|
"test:watch": "eltro --watch my_watch_name",
|
||||||
|
},
|
||||||
|
"watch": {
|
||||||
|
"my_watch_name": {
|
||||||
|
"patterns": [ "src", "test" ],
|
||||||
|
"extensions": "js,mjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* ... */
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Then add `--watch my_watch_name` to your eltro command (as seen in the above example) and you're good to go:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ npm test:watch
|
||||||
|
|
||||||
|
|
||||||
|
test/test.mjs
|
||||||
|
√ Array #indexOf() should return -1 when value is not present
|
||||||
|
|
||||||
|
|
||||||
|
1 passing (3ms)
|
||||||
|
|
||||||
|
[my_watch_name] 09:49:38: Ran successfully. Waiting for file changes before running again...
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also run your own npm command while using the eltro file watcher like so:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ eltro --watch my_watch_name --npm build
|
||||||
|
```
|
||||||
|
|
||||||
|
# Assertions
|
||||||
|
|
||||||
Not only does eltro allow you to use any assertion library of your own choosing, it also comes with it's own assertion library based on node's default [assert](https://nodejs.org/api/assert.html) with a few extra methods:
|
Not only does eltro allow you to use any assertion library of your own choosing, it also comes with it's own assertion library based on node's default [assert](https://nodejs.org/api/assert.html) with a few extra methods:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue