mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-08-30 16:55:08 +08:00
15 lines
378 B
TypeScript
15 lines
378 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import wait from '@/utils/wait';
|
|
|
|
describe('wait', () => {
|
|
it('wait 0.1 second', async () => {
|
|
const startDate = Date.now();
|
|
|
|
await wait(0.1 * 1000);
|
|
|
|
const endDate = Date.now();
|
|
expect(endDate - startDate).toBeGreaterThan(90);
|
|
expect(endDate - startDate).toBeLessThan(150);
|
|
});
|
|
});
|