UNPKG

@shanyue/promise-utils

Version:

Userful promise utils, include map, filter, retry and sleep

13 lines 440 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const mocha_1 = require("mocha"); const chai_1 = require("chai"); const index_1 = require("../index"); mocha_1.describe('Promise.sleep', function () { mocha_1.it('expect work', async () => { const start = Date.now(); await index_1.sleep(800); chai_1.expect(Date.now()).to.gte(start + 800); }); }); //# sourceMappingURL=sleep.js.map