Files
memecoin-botV2/.pnpm-store/v10/files/b5/19cd7f165fed28c3fae9d4c0a4231a64208638c6ae3281ed26d3f11fa70346ab048913b533d477c2df8c066f7999c8c7034640f1f3d2f644fd6f8302a003eb

47 lines
1.0 KiB
Plaintext

import { expect, test } from "vitest";
import nl from "../../../locales/nl.js";
test("Dutch locale error messages", () => {
const { localeError } = nl();
// Test invalid_type
expect(
localeError({
code: "invalid_type",
expected: "string",
input: 123,
})
).toBe("Ongeldige invoer: verwacht string, ontving getal");
// Test too_big with sizing
expect(
localeError({
code: "too_big",
origin: "string",
maximum: 10,
inclusive: true,
input: "test string that is too long",
})
).toBe("Te lang: verwacht dat string <=10 tekens heeft");
// Test too_small with sizing
expect(
localeError({
code: "too_small",
origin: "array",
minimum: 5,
inclusive: false,
input: [1, 2],
})
).toBe("Te klein: verwacht dat array >5 elementen heeft");
// Test invalid_format
expect(
localeError({
code: "invalid_format",
format: "email",
input: "invalid-email",
})
).toBe("Ongeldig: emailadres");
});