How to implement asynchronous reporter in Jasmine3.

66 views
Skip to first unread message

Tymur Daudov

unread,
Feb 15, 2018, 5:10:34 PM2/15/18
to Jasmine
There are no any examples on how to asynchronously report. 
Is there any kind of example on how to perform async tasks in reporter hooks. (I, personally, need to publish results to external resource.)

Gregg Van Hove

unread,
Feb 15, 2018, 5:44:48 PM2/15/18
to jasmi...@googlegroups.com
We totally missed the docs for that with the 3.0 release, thanks for the heads up.

I've just updated the docs for the Reporter Interface (https://jasmine.github.io/api/3.0/Reporter.html) and the custom reporter tutorial (https://jasmine.github.io/tutorials/custom_reporter) for how to make your callbacks async. The short answer is they should work in the same ways that other callbacks (like `it`) do; you should do one of: receive a `done` callback, return a `Promise`, or use the `async` keyword.

Hope this helps. Thanks for using Jasmine!

- Gregg

--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jasmine-js+unsubscribe@googlegroups.com.
To post to this group, send email to jasmi...@googlegroups.com.
Visit this group at https://groups.google.com/group/jasmine-js.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages