While using the junit5-system-exit extension to handle System.exit calls in JUnit 5 tests, I observed that the annotation @ExpectSystemExit works correctly when applied to test methods annotated with @test, but it does not intercept System.exit calls made inside @beforeeach methods.
While using the junit5-system-exit extension to handle System.exit calls in JUnit 5 tests, I observed that the annotation @ExpectSystemExit works correctly when applied to test methods annotated with @test, but it does not intercept System.exit calls made inside @beforeeach methods.