Skip to content

Commit

Permalink
Trying to increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rishigupta1599 committed Nov 23, 2023
1 parent 278bf3f commit eabebdf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/core/test/unit/queue.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,13 @@ describe('Unit / Tasks Queue', () => {
expect(q.size).toBe(2);
});

it('can wait for queued item as well', async () => {
q.set({ concurrency: 1 });
let p = q.push('item_1');
q.flush();
await expectAsync(p).toBeResolved();
});

it('cancels the flush when aborted', async () => {
let resolve, deferred = new Promise(r => (resolve = r));
let p1 = q.push(deferred);
Expand Down

0 comments on commit eabebdf

Please sign in to comment.