Skip to content

Commit

Permalink
Addressing corner cases topic
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTail authored Sep 11, 2024
1 parent f7ac4af commit 339fa20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion designs/2024-hooks-for-test-cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ new RuleTester().run("my-custom-rule", myCustomRule, {

### Corner Cases

- `before` throws `Error`: then the test case should fail, and the error should be reported;
- `before` or `after` throws `Error`: then the test case should fail, and the error should be reported;
- `after` should be executed even when `before` throws in order to minimize potential impact on other test cases;
- Developer must ensure that the `before` function does not inadvertently affect global state in a way that impacts
other test cases.

Expand Down

0 comments on commit 339fa20

Please sign in to comment.