mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-02 01:58:11 +08:00
14 lines
344 B
JavaScript
14 lines
344 B
JavaScript
const wait = require('../../lib/utils/wait');
|
|
|
|
describe('wait', () => {
|
|
it('wait 0.1 second', async () => {
|
|
const startDate = new Date();
|
|
|
|
await wait(0.1 * 1000);
|
|
|
|
const endDate = new Date();
|
|
expect(endDate - startDate).toBeGreaterThan(90);
|
|
expect(endDate - startDate).toBeLessThan(150);
|
|
});
|
|
});
|