UNPKG

@allurereport/web-allure2

Version:

The static files for Allure Classic Report

13 lines (11 loc) 437 B
import { SafeString } from "handlebars/runtime.js"; import { values } from "@/utils/statuses.js"; export default function (statistic) { const fill = values .map((status) => { const count = !statistic || typeof statistic[status] === "undefined" ? 0 : statistic[status]; return count === 0 ? "" : `<span class="label label_status_${status}">${count}</span> `; }) .join(""); return new SafeString(`${fill}`); }