Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make assertions throw #3246

Merged
merged 2 commits into from Oct 22, 2023
Merged

Make assertions throw #3246

merged 2 commits into from Oct 22, 2023

Commits on Oct 22, 2023

  1. Configuration menu
    Copy the full SHA
    1408d2b View commit details
    Browse the repository at this point in the history
  2. Make assertions throw

    Fixes #3201.
    
    Assertions now throw a `TestFailure` error when they fail. This error is not exported or documented and should not be used or thrown manually. You cannot catch this error in order to recover from a failure, use `t.try()` instead.
    
    All assertions except for `throws` and `throwsAsync` now return `true` when they pass. This is useful for some of the assertions in TypeScript where they can be used as a type guard.
    
    Committing a failed `t.try()` result now also throws.
    novemberborn committed Oct 22, 2023
    Configuration menu
    Copy the full SHA
    a706a5f View commit details
    Browse the repository at this point in the history