mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-03 10:23:13 +00:00
* feat(shared): add payment ladder and CSV domain package Introduce @seahaven-ap/shared via npm workspaces so FE and future API share payments-dashboard-compatible status ladders, pay-date helpers, and CSV headers. * fix(web): build shared package before vite dev Ensure fresh npm ci && npm run dev (and Playwright webServer) can resolve @seahaven-ap/shared dist exports that are gitignored.
25 lines
804 B
TypeScript
25 lines
804 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { PAYMENT_CSV_HEADER, PAYMENT_CSV_HEADERS, PAYMENT_CSV_METHODS } from "./csv.js";
|
|
|
|
describe("payment CSV constants", () => {
|
|
it("freezes the consumer header contract and order", () => {
|
|
expect([...PAYMENT_CSV_HEADERS]).toEqual([
|
|
"Check Number",
|
|
"Method",
|
|
"Status",
|
|
"Send Payment On",
|
|
"Amount in USD",
|
|
"Amount",
|
|
"Payee",
|
|
"Invoice Numbers",
|
|
"Company/Subsidiary",
|
|
]);
|
|
expect(PAYMENT_CSV_HEADER.checkNumber).toBe("Check Number");
|
|
expect(PAYMENT_CSV_HEADER.companySubsidiary).toBe("Company/Subsidiary");
|
|
});
|
|
|
|
it("exports Check and ACH method display values", () => {
|
|
expect(PAYMENT_CSV_METHODS.check).toBe("Check");
|
|
expect(PAYMENT_CSV_METHODS.ach).toBe("ACH");
|
|
});
|
|
});
|