Skip to content

Commit

Permalink
Made tearDown() async
Browse files Browse the repository at this point in the history
  • Loading branch information
marcj committed Mar 25, 2019
1 parent 2cc14d4 commit a268e97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/estdlib-rxjs/src/rxjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ export function promiseToObservable<T>(o: () => Promise<T>): Observable<T> {
});
}

export function tearDown(teardown: TeardownLogic) {
export async function tearDown(teardown: TeardownLogic) {
if ('function' === typeof teardown) {
teardown();
await teardown();
} else if ('object' === typeof teardown && teardown.unsubscribe) {
teardown.unsubscribe();
await teardown.unsubscribe();
}
}

0 comments on commit a268e97

Please sign in to comment.