From a8c1340fa73c8d11083052c7e5a05c21219088ba Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 11 Apr 2024 14:41:00 +0200 Subject: [PATCH] test(Modal): add test without `close` --- test/components/Modal.spec.ts | 1 + .../__snapshots__/Modal.spec.ts.snap | 43 +++++++++++++------ 2 files changed, 32 insertions(+), 12 deletions(-) diff --git a/test/components/Modal.spec.ts b/test/components/Modal.spec.ts index e5b1a340..c587a6ad 100644 --- a/test/components/Modal.spec.ts +++ b/test/components/Modal.spec.ts @@ -10,6 +10,7 @@ describe('Modal', () => { ['with fullscreen', { props: { open: true, portal: false, fullscreen: true, title: 'Title', description: 'Description' } }], ['without overlay', { props: { open: true, portal: false, overlay: false, title: 'Title', description: 'Description' } }], ['without transition', { props: { open: true, portal: false, transition: false, title: 'Title', description: 'Description' } }], + ['without close', { props: { open: true, portal: false, close: null, title: 'Title', description: 'Description' } }], ['with class', { props: { open: true, portal: false, class: 'bg-gray-50 dark:bg-gray-800' } }], ['with ui', { props: { open: true, portal: false, ui: { close: 'right-2' } } }], ['with default slot', { props: { open: true, portal: false }, slots: { default: () => 'Default slot' } }], diff --git a/test/components/__snapshots__/Modal.spec.ts.snap b/test/components/__snapshots__/Modal.spec.ts.snap index 51169ae3..10ca921b 100644 --- a/test/components/__snapshots__/Modal.spec.ts.snap +++ b/test/components/__snapshots__/Modal.spec.ts.snap @@ -29,7 +29,7 @@ exports[`Modal > renders with body slot correctly 1`] = `
-