test: make vite happy

This commit is contained in:
鲁树人 2024-12-15 04:52:36 +09:00
parent 531930a6ec
commit ec4bd16b03

View File

@ -101,7 +101,7 @@ test('it should move on to the next item in the queue once failed', async () =>
await expect(badPromise).rejects.toThrowError('dummy error'); await expect(badPromise).rejects.toThrowError('dummy error');
queuedResolver.forEach((resolve) => resolve()); queuedResolver.forEach((resolve) => resolve());
expect(Promise.all(promises)).resolves.toEqual([1, 2, 4, 5]); await expect(Promise.all(promises)).resolves.toEqual([1, 2, 4, 5]);
} finally { } finally {
vi.spyOn(queue, 'handler').mockRejectedValue(new Error('handler ran too late')); vi.spyOn(queue, 'handler').mockRejectedValue(new Error('handler ran too late'));
queuedResolver.forEach((resolve) => resolve()); queuedResolver.forEach((resolve) => resolve());