Files
RSSHub/test/utils/wait.js
2019-11-25 12:10:39 +08:00

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);
});
});