mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
29 lines
931 B
TypeScript
29 lines
931 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { documentSettingCode } from "./documentSettingCode";
|
|
|
|
describe("documentSettingCode", () => {
|
|
it("resolves the nationality set", () => {
|
|
expect(documentSettingCode("ethiopian")).toBe(
|
|
"company_onboarding_documents_ethiopian",
|
|
);
|
|
expect(documentSettingCode("foreign")).toBe(
|
|
"company_onboarding_documents_foreign",
|
|
);
|
|
expect(documentSettingCode(null)).toBe(
|
|
"company_onboarding_documents_ethiopian",
|
|
);
|
|
});
|
|
|
|
it("replaces the nationality set for a co-operative", () => {
|
|
expect(documentSettingCode("ethiopian", true)).toBe(
|
|
"company_onboarding_documents_cooperative",
|
|
);
|
|
// A co-op is never foreign, but a stale flag must not fall back to the
|
|
// foreign set — the co-op answer wins.
|
|
expect(documentSettingCode("foreign", true)).toBe(
|
|
"company_onboarding_documents_cooperative",
|
|
);
|
|
});
|
|
});
|