UNPKG

e2ed

Version:

E2E testing framework over Playwright

16 lines (15 loc) 651 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.waitForTimeout = void 0; const getDurationWithUnits_1 = require("../../utils/getDurationWithUnits"); const log_1 = require("../../utils/log"); const promise_1 = require("../../utils/promise"); /** * Waits for timeout in `delayInMs` milliseconds. */ const waitForTimeout = (delayInMs) => { const delayWithUnits = (0, getDurationWithUnits_1.getDurationWithUnits)(delayInMs); (0, log_1.log)(`Wait for ${delayWithUnits}`, 5 /* LogEventType.InternalAction */); return (0, promise_1.getTimeoutPromise)(delayInMs); }; exports.waitForTimeout = waitForTimeout;