Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
FineArchs committed Oct 22, 2024
1 parent 746e9f5 commit dfbdc91
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,15 @@ describe('IRQ', () => {

test.concurrent('It ends', async () => {
const countSleepsSpy = vi.fn(countSleeps);
const promise = countSleepsSpy(100);
vi.advanceTimersByTime(1000);
countSleepsSpy(100);
await vi.advanceTimersByTimeAsync(1000);
return expect(countSleepsSpy).toHaveResolved();
});

test.concurrent('It takes time', () => {
test.concurrent('It takes time', async () => {
const countSleepsSpy = vi.fn(countSleeps);
const promise = countSleepsSpy(100);
vi.advanceTimersByTime(900);
countSleepsSpy(100);
await vi.advanceTimersByTimeAsync(999);
return expect(countSleepsSpy).not.toHaveResolved();
});

Expand Down

0 comments on commit dfbdc91

Please sign in to comment.