jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
32 lines • 1.41 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.toTestResult = toTestResult;
const ensureUUID_1 = require("./ensureUUID");
const hashHistoryId_1 = require("./hashHistoryId");
const normalizeLabels_1 = require("./normalizeLabels");
const normalizeAttachments_1 = require("./normalizeAttachments");
const normalizeParameters_1 = require("./normalizeParameters");
const toTestStep_1 = require("./toTestStep");
function toTestResult(rootDirectory, test) {
return {
uuid: (0, ensureUUID_1.ensureUUID)(test),
historyId: (0, hashHistoryId_1.hashHistoryId)(test),
name: test.displayName,
fullName: test.fullName,
start: test.start,
stop: test.stop,
description: test.descriptionHtml ? undefined : test.description,
descriptionHtml: test.descriptionHtml,
stage: test.stage,
status: test.status,
statusDetails: test.statusDetails,
steps: test.steps
?.filter((step) => !step.hookType)
.map((step) => (0, toTestStep_1.toTestStep)(rootDirectory, step)),
labels: (0, normalizeLabels_1.normalizeLabels)(test),
links: test.links,
attachments: (0, normalizeAttachments_1.normalizeAttachments)(rootDirectory, test),
parameters: (0, normalizeParameters_1.normalizeParameters)(test),
};
}
//# sourceMappingURL=toTestResult.js.map