async-await-jasmine
async-await-jasmine is utility for jasmine with async await.
Installation
npm install async-await-jasmine
Sample Code
; describe"async-test",;
Motivation
Jasmine's async programing paradime is that assetion code call done method if it have done. But in the case using async await, assertion code throw exception when promise is rejected. So it don't call done method. And we must wait timeout and we get no error message.
Problem Code
describe"async-test",;
Solution
async-await-jasmine uses zone.js.
zone.js can handle async error even if code is in zone. so when assetion code throw exception, async-await-jasmine automatically call fail and done metod. Then we need not wait timeout and we get error message.