jest-allure2-reporter
Version:
Idiomatic Jest reporter for Allure Framework
18 lines • 630 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.keyedLabel = keyedLabel;
const common_1 = require("../../common");
const utils_1 = require("../../../utils");
function keyedLabel(value) {
if (value == null) {
return;
}
if (typeof value === 'function') {
return value;
}
if (typeof value === 'string') {
return (context) => (0, utils_1.thruMaybePromise)(context.value, (base) => base ?? value);
}
return (0, common_1.compose2)((0, common_1.appender)(value), ({ value }) => (0, utils_1.asArray)(value));
}
//# sourceMappingURL=keyedLabel.js.map