Closed KolesnikDmitriy closed 23 hours ago
what is a main idea of this MR?
The main idea is fix documentation to avoid confusion of newcomers. They may start using defer after t.Require
In common case it make sense but in that example the reason why defer stay there is to highlight semantic of WithTearDown function
It looks like common sense to me that you need to put it in the begging of Test
Let me think day or two about that
Describe the bug Incorrect example with defer. Require my stops test execution when a test result fails, and defer stack will not fill.
To Reproduce Steps to reproduce the behavior: look through example: https://github.com/ozontech/allure-go/blob/master/examples/suite_demo/setup_test.go#L92
Expected behavior defer should executed right after context declaration