An open API service indexing awesome lists of open source software.

https://github.com/hudson-newey/ng-jasmine-async-wrapper

A simple wrapper for async functions in Angular + Jasmine
https://github.com/hudson-newey/ng-jasmine-async-wrapper

angular jasmine jasmine-framework jasmine-tests test testing testing-tools unit-testing

Last synced: about 1 month ago
JSON representation

A simple wrapper for async functions in Angular + Jasmine

Awesome Lists containing this project

README

        

# ngx-[Jasmine](https://github.com/jasmine/jasmine) async wrapper

A wrapper for async functions in Angular + Jasmine tests

## Usage

```ts
it("should create", asyncTest(() => {
expect(component).toBeInstanceOf(App);
}));
```

## Why?

Because

1. Jasmine throws an error if there are still async tasks waiting
2. 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`)