Hi, I have an problem with setting up my test suite and maybe you got some ideas how to improve my approach. Inside BeforeSuite I set up RegisterFailHandler and it is working correctly when Expect fails in BeforeEach section.
However, when Expect fails in BeforeAll section then fail handler is not launched. How can I make sure that my fail handler will launch in this case? I figured out one solution by calling defer GinkgoRecover() on first line in every BeforeAll section but it does not looks good for me and I don't have any proof that it should be done in this way.
Hi, I have an problem with setting up my test suite and maybe you got some ideas how to improve my approach. Inside
BeforeSuiteI set upRegisterFailHandlerand it is working correctly whenExpectfails inBeforeEachsection.However, when
Expectfails inBeforeAllsection then fail handler is not launched. How can I make sure that my fail handler will launch in this case? I figured out one solution by callingdefer GinkgoRecover()on first line in everyBeforeAllsection but it does not looks good for me and I don't have any proof that it should be done in this way.