ngx-Jasmine async wrapper
A wrapper for async functions in Angular + Jasmine tests
it("should create", asyncTest(() => {
expect(component).toBeInstanceOf(App);
}));
Because
- Jasmine throws an error if there are still async tasks waiting
- Discarding async tasks must be done explicitly as they have to be discarded in the same async zone as they were created (we can't use
afterEach
)