You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gomega handles assertion failures exactly like Goblin's internal assertion library handles assertion failures: by calling a fail method that is provided to it (in Goblin's case it is g.fail which does not panic).
It would be incorrect for Gomega to panic because there is no way for the caller to rescue a panic emitted in a called go routine. This would make your asynchronous test example impossible:
g.Describe("Numbers", func() {
g.It("Should add two numbers asynchronously", func(doneDone) {
gofunc() {
g.Assert(1+1).Equal(2) //If this line panics there's no way for the test framework to catch it!done()
}()
})
})
Would you mind changing the language in the Readme to indicate that this really is not an open issue in Gomega any more? Thanks!
The text was updated successfully, but these errors were encountered:
Gomega handles assertion failures exactly like Goblin's internal assertion library handles assertion failures: by calling a fail method that is provided to it (in Goblin's case it is
g.fail
which does not panic).It would be incorrect for Gomega to panic because there is no way for the caller to rescue a panic emitted in a called go routine. This would make your asynchronous test example impossible:
Would you mind changing the language in the Readme to indicate that this really is not an open issue in Gomega any more? Thanks!
The text was updated successfully, but these errors were encountered: