jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
15 lines • 587 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hashHistoryId = hashHistoryId;
const node_crypto_1 = require("node:crypto");
const logger_1 = require("../../logger");
const utils_1 = require("../../utils");
function hashHistoryId(result) {
const { fullName, historyId } = result;
if (!historyId) {
logger_1.log.warn(`Detected empty "historyId" in test: ${fullName}`);
return (0, utils_1.md5)((0, node_crypto_1.randomBytes)(16));
}
return (0, utils_1.md5)(String(historyId));
}
//# sourceMappingURL=hashHistoryId.js.map