acuminous / yadda

A BDD javascript library
412 stars 73 forks source link

Q: How to know which step failed when using the scenario-level plugin? #197

Closed provegard closed 8 years ago

provegard commented 8 years ago

I use the scenario-level plugin for a number of reasons that prevent me from using the step-level plugin.

All step implementations are async. Whenever a step fails to invoke next, I get an error from Jasmine:

Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

While this is expected, it would be nice to be able to know which step it was that failed. Is that possible in some way?

cressie176 commented 8 years ago

Interesting problem. Yadda emits events (although not in the traditional node way). You may be able to hook into one of these to find out which step was executed last.

See https://acuminous.gitbooks.io/yadda-user-guide/content/en/usage/events.html for more details.

provegard commented 8 years ago

Looks useful, I'll try. Thanks!

cressie176 commented 8 years ago

Any luck?

provegard commented 8 years ago

Sorry, other things got in the way. I'll have a look within a few days and will report progress back here. :-)

provegard commented 8 years ago

The event approach worked well, closing this issue. Thanks!

cressie176 commented 8 years ago

Good news. Thanks for the update