jasmine: Bail on first failure
Put together an extension to add bail after first failure behavior after someone else had the same request, and I didn’t hear of existing work from the community.
I’d love to see this behavior (jasmine.Env.prototype.bailFast()) added to jasmine core before I suggest a flag for jasmine-node.
I’m happy to put together a PR if folks think this would be useful and agree it belongs in jasmine core.
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 30
- Comments: 68 (7 by maintainers)
+1
+1
I’m kind of new to this whole Jasmine/Protractor thing, which by the way, I think is one of the most elegant test frameworks I’ve seen, but maybe another way to think about this feature is to extend the expect() function grammar to allow writing chains like this:
expect(condition).verb(something).or.stop(); expect(element(by.id(‘my-element’)).isPresent()).toBe(true).or.stop();
+1
+1
I came here because this issue is referenced in the Jasmine Core 3.0 Release Notes. Unfortunately, I don’t know what has been changed because I see a lot of
+1comments here but no demo code.Does anyone have an example of how “proper fail fast with error reporting” looks like?
Found myself doing the same thing @pmowrer 😃
https://github.com/F1LT3R/protractor-jasmine2-fail-whale
Designed for Jasmine2, but I suspect it may work with earlier versions too.
+1
+1
+1