Skip to content

Add doesNotThrow() and an inspect callback for throws() - #27

Merged
k2gl merged 1 commit into
mainfrom
does-not-throw
Sep 10, 2026
Merged

Add doesNotThrow() and an inspect callback for throws()#27
k2gl merged 1 commit into
mainfrom
does-not-throw

Conversation

@k2gl

@k2gl k2gl commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Two idioms the family tests still had to spell out by hand: "this input is accepted" (a bare call followed by addToAssertionCount) and "the exception carries this status code" (a try/catch around the call). doesNotThrow() covers the first; throws() now takes an inspect callback for the second, so the exception can be checked with ordinary fact() calls.

@k2gl
k2gl enabled auto-merge (squash) September 10, 2026 16:55
@k2gl
k2gl merged commit ab9194f into main Sep 10, 2026
11 checks passed
@k2gl
k2gl deleted the does-not-throw branch September 10, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant