jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
19 lines • 590 B
JavaScript
;
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