UNPKG

jest-allure2-reporter

Version:
19 lines 590 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TaskQueue = void 0; class TaskQueue { #idle = Promise.resolve(); #logError; constructor(config) { this.#logError = config.logError; } flush = () => this.#idle; enqueueTask = (task) => { const result = (this.#idle = typeof task === 'function' ? this.#idle.then(task) : this.#idle.then(() => task)); this.#idle = this.#idle.catch(this.#logError); return result; }; } exports.TaskQueue = TaskQueue; //# sourceMappingURL=TaskQueue.js.map