UNPKG

jest-allure2-reporter

Version:
13 lines 605 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.placeAttachment = placeAttachment; const tslib_1 = require("tslib"); const node_path_1 = tslib_1.__importDefault(require("node:path")); const node_crypto_1 = require("node:crypto"); const utils_1 = require("../../utils"); function placeAttachment(context) { const { outDir, name, sourcePath } = context; const fileName = name || sourcePath || ''; return node_path_1.default.join(outDir, (0, node_crypto_1.randomUUID)() + (0, utils_1.getFullExtension)(fileName)); } //# sourceMappingURL=placeAttachment.js.map