You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-21Lines changed: 13 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,19 @@ If you want to be sure that you have fixed a flaky test, or are chasing down a r
26
26
27
27
`testrig` enables a few QoL features for running large Go test suites efficiently. You can define test lifecycle hooks, and run from the CLI, or from a lightweight Go setup.
28
28
29
+
### Lifecycle Hooks
30
+
31
+
Run setup and teardown scripts during your test lifecycle.
32
+
33
+
<!-- testrig:gendocs:table -->
34
+
| Option | When it runs | CLI equivalent |
35
+
| ------ | ------------ | -------------- |
36
+
|`testrig.GlobalSetup`| Run once before any tests |`--global-setup`|
37
+
|`testrig.GlobalTeardown`| Run once after all tests finish |`--global-teardown`|
38
+
|`testrig.IterationSetup`| Run before each diagnose iteration |`--iteration-setup`|
39
+
|`testrig.IterationTeardown`| Run after each diagnose iteration |`--iteration-teardown`|
You can import `testrig` as a Go package and define your hooks and defaults entirely in Go! See [the pkg.go.dev docs](https://pkg.go.dev/github.com/smartcontractkit/testrig#pkg-examples) for an example setup.
48
-
49
-
### Lifecycle Hooks
50
-
51
-
Run setup and teardown scripts during your test lifecycle.
52
-
53
-
<!-- testrig:gendocs:table -->
54
-
| Option | When it runs | CLI equivalent |
55
-
| ------ | ------------ | -------------- |
56
-
|`testrig.GlobalSetup`| Run once before any tests |`--global-setup`|
57
-
|`testrig.GlobalTeardown`| Run once after all tests finish |`--global-teardown`|
58
-
|`testrig.IterationSetup`| Run before each diagnose iteration |`--iteration-setup`|
59
-
|`testrig.IterationTeardown`| Run after each diagnose iteration |`--iteration-teardown`|
60
-
<!-- /testrig:gendocs:table -->
61
-
62
-
## Contributing
63
-
64
-
Use [just](https://github.com/casey/just) instead of `make`.
65
-
66
-
```sh
67
-
just lefthook # Install pre-commit and pre-push hooks
0 commit comments