Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nto main
  • Loading branch information
NotRealAI committed Jan 20, 2021
2 parents 018b46d + 193d038 commit 1c9099b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,21 @@ POSITIONAL ARGUMENTS:
test: Runs mocha tests
For global options help run: hardhat help
```
````
### Changed file as argument

The path of the changed file can be inserted into positional arguments using the template parameter `{path}`. This speeds up iteration in testing, especially if using single test isolation (for example, by using `it.only("test")` in mocha.)

Example:
```
````
module.exports = {
watcher: {
test: {
tasks: [{ command:'test', params: {testFiles: ['{path}']} }],
tasks: [{ command: 'test', params: { testFiles: ['{path}'] } }],
files: ['./test/**/*'],
verbose: true
}
}
}
```
````

0 comments on commit 1c9099b

Please sign in to comment.