UNPKG

jest-allure2-reporter

Version:
20 lines 881 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.toTestContainer = toTestContainer; const uuid_1 = require("uuid"); const toTestStep_1 = require("./toTestStep"); const NAMESPACE = (0, uuid_1.v5)('jest-allure2-reporter', '00000000-0000-0000-0000-000000000000'); function toTestContainer(test, options) { return { uuid: (0, uuid_1.v5)(options.testUUID, NAMESPACE), name: options.name, children: [options.testUUID], befores: test.steps ?.filter((step) => step.hookType?.startsWith('before')) .map((step) => (0, toTestStep_1.toTestStep)(options.rootDir, step)), afters: test.steps ?.filter((step) => step.hookType?.startsWith('after')) .map((step) => (0, toTestStep_1.toTestStep)(options.rootDir, step)), }; } //# sourceMappingURL=toTestContainer.js.map