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

intercept[AssertionError] should fail if no AssertionError is thrown #679

Closed
aymanelamyaghri opened this issue Jul 27, 2023 · 0 comments · Fixed by #683
Closed

intercept[AssertionError] should fail if no AssertionError is thrown #679

aymanelamyaghri opened this issue Jul 27, 2023 · 0 comments · Fixed by #683

Comments

@aymanelamyaghri
Copy link

This test should fail but it succeeds:

package example

class MyTests extends munit.FunSuite {
    test("intercept AssertionError") {
        intercept[AssertionError](println("Hello"))
    }
}

The output is:

Hello
example.MyTests:
  + intercept AssertionError 0.168s
@aymanelamyaghri aymanelamyaghri changed the title intercept[AssertionError] should fail if no AssertionError is thrown intercept[AssertionError] should fail if no AssertionError is thrown Jul 27, 2023
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 a pull request may close this issue.

1 participant