From 780caf1ef42b9ed94a4ba5e4c79ebc9bfea77fb3 Mon Sep 17 00:00:00 2001 From: Alex Varchuk Date: Mon, 30 Dec 2024 16:01:09 +0100 Subject: [PATCH] chore: improve tests --- src/components/__tests__/FieldDetails.test.tsx | 2 +- .../__snapshots__/FieldDetails.test.tsx.snap | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/__tests__/FieldDetails.test.tsx b/src/components/__tests__/FieldDetails.test.tsx index 0d70fe55cd..03331ed828 100644 --- a/src/components/__tests__/FieldDetails.test.tsx +++ b/src/components/__tests__/FieldDetails.test.tsx @@ -90,7 +90,7 @@ describe('FieldDetailsComponent', () => { items: { type: 'string', pattern: '^see regex[0-9]$', - constraints: [''], + constraints: ['<= 128 characters'], externalDocs: undefined, }, } as any as SchemaModel, diff --git a/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap b/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap index a8b1a44fac..5d6e6811c8 100644 --- a/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap +++ b/src/components/__tests__/__snapshots__/FieldDetails.test.tsx.snap @@ -161,13 +161,21 @@ exports[`FieldDetailsComponent renders correctly when field items have string ty - [ + [ items + + + + <= 128 characters + + ^see regex[0-9]$ - ] + ]