jasmine-await
This project adds asyncawait support to jasmine.
It extends the functions it()
, beforeEach()
, afterEach()
, beforeAll()
and afterAll()
and wraps
them in the async()
function. So you can always use await()
to wait for a promise's resolution or rejection.
Installation
npm i -D jasmine-await
Usage
Example1:
var async = ;var it = asyncit;var await = asyncawait;
Example2 (same test, using typescript with jasmine-ts):
it"should work",
Note
You still need to install the typings for jasmine to make the typescript-compiler happy about your specs:
typings i -D --ambient jasmine