Skip to content

Commit

Permalink
test(defer): remove useless wait test
Browse files Browse the repository at this point in the history
  • Loading branch information
samouss committed Jul 10, 2019
1 parent 095b715 commit fb1a34c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/lib/utils/__tests__/defer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,6 @@ describe('defer', () => {
expect(fn).toHaveBeenCalledTimes(1);
});

it('waits for the deferred function', async () => {
const fn = jest.fn();
const deferred = defer(fn);

deferred();

await deferred.wait();

expect(fn).toHaveBeenCalledTimes(1);
});

it('throws an error when `wait` is called before the deferred function', () => {
const fn = jest.fn();
const deferred = defer(fn);
Expand Down

0 comments on commit fb1a34c

Please sign in to comment.