allure-vitest
Version:
Allure Vitest integration
17 lines • 677 B
JavaScript
import { LabelName } from "allure-js-commons";
import { includedInTestPlan, parseTestPlan } from "allure-js-commons/sdk/reporter";
import { getTestMetadata } from "../utils.js";
export const commands = {
existsInTestPlan: (ctx, task) => {
if (!ctx.allureTestPlan) {
ctx.allureTestPlan = parseTestPlan();
}
if (!ctx.allureTestPlan) {
return true;
}
const { fullName, labels } = getTestMetadata(task);
const { value: id } = labels.find(({ name }) => name === LabelName.ALLURE_ID) ?? {};
return includedInTestPlan(ctx.allureTestPlan, { fullName, id });
},
};
//# sourceMappingURL=index.js.map