Files
kandev/apps/web/components/gitlab/mr-overview-section.test.ts
T
2026-08-05 15:14:26 +02:00

29 lines
709 B
TypeScript

import { describe, expect, it } from "vitest";
import { t } from "@/lib/i18n";
import { pipelineSummary } from "./mr-overview-section";
describe("pipelineSummary", () => {
it("does not present unknown job totals as zero passing out of zero", () => {
expect(
pipelineSummary(
{
id: 1,
iid: 2,
status: "running",
source: "merge_request_event",
ref: "main",
sha: "abc123",
web_url: "",
jobs_total: 0,
jobs_passing: 0,
},
t,
),
).toBe("running");
});
it("localizes the no-pipeline branch", () => {
expect(pipelineSummary(undefined, t)).toBe("No pipeline");
});
});