Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions frontend/__tests__/utils/sanitize.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,18 @@ describe("sanitize function", () => {
optional: { name: "Alice", age: 23 },
},
},
{
input: {
name: "Alice",
//results in two errors on the same path. array with invalid value and not enough items
enumArray: ["invalid" as any],
},
expected: {
mandatory: false,
partial: { name: "Alice" }, //enumArray is removed
optional: false,
},
},
];

it.for(testCases)("object mandatory with $input", ({ input, expected }) => {
Expand Down
Loading
Loading