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

Panic instead of calling a fail function #5

Closed
xetorthio opened this issue Oct 17, 2013 · 1 comment
Closed

Panic instead of calling a fail function #5

xetorthio opened this issue Oct 17, 2013 · 1 comment

Comments

@xetorthio
Copy link

This a better approach to integrate with other testing frameworks, since it doesn't require any special function to be implemented by the testing framework.

@onsi
Copy link
Owner

onsi commented Oct 17, 2013

I originally wanted to implement the failure handling as a panic. This was a non-starter though because a panic emitted in a goroutine cannot be rescued by the calling goroutine. There are certain important use cases (async tests, marchers in goroutines) where you may want to use a marcher in a goroutine.

With that said, if a testing framework requires a panic to signify failure it is a trivial thing to pass in a fail function to gomega that panics.

On Oct 16, 2013, at 10:18 PM, Jonathan Leibiusky notifications@github.com wrote:

This a better approach to integrate with other testing frameworks, since it doesn't require any special function to be implemented by the testing framework.


Reply to this email directly or view it on GitHub.

@onsi onsi closed this as completed Oct 17, 2013
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

No branches or pull requests

2 participants