Purpose of this library
This library shall simplify promise handling within jasmine. To achieve this, it provides some wrapper functions which can handle returned promises. The specs will wait for the resolution or rejection of those promises.
The following wrapping functions are exported by this library:
it(description, fn, timeout)
Additionaly there is an
invert(promise) function that takes promise
and returns an inverted promise that is rejected with the original
resolution or resolved with the original rejection.
This comes in handy when expecting promises to be rejected.
;;it"should wait for a promise",;// alternative with implicit returns:it"should wait for a promise",unit.thenexpectresult.toBe"success";// alternative with async/await:it"should wait for a promise",;