mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
20 lines
602 B
TypeScript
20 lines
602 B
TypeScript
import { transformErrorMessages } from "../../src/utils";
|
|
|
|
describe("transformErrorMessages", () => {
|
|
it("should transform error messages", () => {
|
|
const errorMessages = [
|
|
"title should not be empty",
|
|
"status must be a valid enum value",
|
|
"status should not be empty",
|
|
];
|
|
|
|
expect(transformErrorMessages(errorMessages)).toEqual({
|
|
title: ["title should not be empty"],
|
|
status: [
|
|
"status must be a valid enum value",
|
|
"status should not be empty",
|
|
],
|
|
});
|
|
});
|
|
});
|