Skip to content

Commit baad071

Browse files
committed
chore: add verbosity flag to solidity test and test tasks
1 parent 0cfd2a4 commit baad071

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

v-next/hardhat/src/internal/builtin-plugins/solidity-test/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ const hardhatPlugin: HardhatPlugin = {
3434
name: "noCompile",
3535
description: "Don't compile the project before running the tests",
3636
})
37+
.addLevel({
38+
name: "verbosity",
39+
shortName: "v",
40+
description: "Log verbosity",
41+
defaultValue: 2
42+
})
3743
.setAction(import.meta.resolve("./task-action.js"))
3844
.build(),
3945
],

v-next/hardhat/src/internal/builtin-plugins/test/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ const hardhatPlugin: HardhatPlugin = {
2929
name: "noCompile",
3030
description: "Don't compile the project before running the tests",
3131
})
32+
.addLevel({
33+
name: "verbosity",
34+
shortName: "v",
35+
description: "Log verbosity",
36+
defaultValue: 2
37+
})
3238
.setAction(import.meta.resolve("./task-action.js"))
3339
.build(),
3440
],

v-next/hardhat/src/internal/builtin-plugins/test/task-action.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ interface TestActionArguments {
2020
}
2121

2222
const runAllTests: NewTaskActionFunction<TestActionArguments> = async (
23-
{ testFiles, chainType, grep, noCompile },
23+
{ testFiles, chainType, grep, noCompile, verbosity },
2424
hre,
2525
) => {
2626
// If this code is executed, it means the user has not specified a test runner.
@@ -65,6 +65,10 @@ const runAllTests: NewTaskActionFunction<TestActionArguments> = async (
6565
args.chainType = chainType;
6666
}
6767

68+
if (subtask.options.has("verbosity")) {
69+
args.verbosity = verbosity;
70+
}
71+
6872
await subtask.run(args);
6973
}
7074

0 commit comments

Comments
 (0)