Skip to content

Commit

Permalink
Add tests watch
Browse files Browse the repository at this point in the history
  • Loading branch information
ylv-io committed Jun 2, 2021
1 parent 0137cdd commit 8e1ca65
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ yarn estimate-size
yarn test
```

Or watch test 👁

```bash
yarn test:watch
```

## Publish

## Deploy
9 changes: 9 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ require('hardhat-contract-sizer');
require('hardhat-docgen');
require('hardhat-gas-reporter');
require('hardhat-log-remover');
require('hardhat-watcher');

require('@tenderly/hardhat-tenderly');
require('solidity-coverage');
Expand Down Expand Up @@ -120,4 +121,12 @@ module.exports = {
mocha: {
timeout: 120000,
},

watcher: {
test: {
tasks: [{ command: 'test', params: { testFiles: ['{path}'] } }],
files: ['./test/**/*'],
verbose: true,
},
},
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"ethereum-waffle": "^3.0.2",
"ethers": "^5.0.7",
"hardhat": "^2.1.2",
"hardhat-watcher": "^2.1.1",
"node-watch": "^0.6.4",
"superagent": "^6.1.0"
},
Expand All @@ -80,6 +81,7 @@
"deploy:rinkeby": "hardhat deploy --network rinkeby",
"chain": "hardhat node --as-network hardhat --show-stack-traces",
"test": "OPTIMIZER=false hardhat test --network hardhat --max-memory 8096",
"test:watch": "OPTIMIZER=false hardhat watch test --network hardhat --max-memory 8096",
"gas-report": "REPORT_GAS=1 hardhat test --network hardhat --max-memory 8096",
"estimate-size": "yarn compile && hardhat size-contracts --max-memory 8096",
"coverage": "hardhat coverage --max-memory 8096"
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ chokidar@^2.1.8:
optionalDependencies:
fsevents "^1.2.7"

chokidar@^3.4.0, chokidar@^3.4.1:
chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.3:
version "3.5.1"
resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz"
integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==
Expand Down Expand Up @@ -5518,6 +5518,13 @@ hardhat-log-remover@^2.0.2:
resolved "https://registry.yarnpkg.com/hardhat-log-remover/-/hardhat-log-remover-2.0.2.tgz#6014fe2c515ced1e0eaa7a4d854e37695aaac61a"
integrity sha512-TvEWOisQmZUZ7Mlb7s4XYS/MxgZzjFJSjDI8v3uTcrD6aaXy1QtomW6D6WNsISEWtwwRlSntOGpHQwFjrz2MCw==

hardhat-watcher@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/hardhat-watcher/-/hardhat-watcher-2.1.1.tgz#8b05fec429ed45da11808bbf6054a90f3e34c51a"
integrity sha512-zilmvxAYD34IofBrwOliQn4z92UiDmt2c949DW4Gokf0vS0qk4YTfVCi/LmUBICThGygNANE3WfnRTpjCJGtDA==
dependencies:
chokidar "^3.4.3"

hardhat@^2.1.2:
version "2.1.2"
resolved "https://registry.npmjs.org/hardhat/-/hardhat-2.1.2.tgz"
Expand Down

0 comments on commit 8e1ca65

Please sign in to comment.