jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
15 lines • 726 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.writeHandler = void 0;
const tslib_1 = require("tslib");
const node_path_1 = tslib_1.__importDefault(require("node:path"));
const promises_1 = tslib_1.__importDefault(require("node:fs/promises"));
const placeAttachment_1 = require("./placeAttachment");
const writeHandler = async (context) => {
const destination = (0, placeAttachment_1.placeAttachment)(context);
await promises_1.default.mkdir(node_path_1.default.dirname(destination), { recursive: true });
await promises_1.default.writeFile(destination, context.content);
return destination;
};
exports.writeHandler = writeHandler;
//# sourceMappingURL=writeHandler.js.map