Files
stock-manager/tests/unit/components/common/pageheader.test.ts
T

19 lines
536 B
TypeScript

import { describe, expect, it } from "vitest"
import { getPageHeaderAddLabel } from "@/components/common/pageheader.utils"
describe("PageHeader", () => {
it("uses the explicit add label when provided", () => {
expect(
getPageHeaderAddLabel({
addLabel: "Agregar categoría",
title: "Categorías",
}),
).toBe("Agregar categoría")
})
it("keeps the legacy fallback when no explicit add label is provided", () => {
expect(getPageHeaderAddLabel({ title: "Items" })).toBe("Add Items")
})
})