test: update

This commit is contained in:
Benjamin Canac
2024-03-20 14:03:33 +01:00
parent 6e10a0942f
commit 418ffb8426
9 changed files with 217 additions and 579 deletions

View File

@@ -15,9 +15,9 @@ const TooltipWrapper = defineComponent({
describe('Tooltip', () => {
it.each([
['with text', { props: { text: 'Tooltip', open: true }, slots: { default: () => 'Hover me' } }],
['with arrow', { props: { text: 'Tooltip', arrow: true, open: true }, slots: { default: () => 'Hover me' } }],
['with shortcuts', { props: { text: 'Tooltip', shortcuts: ['⌘', 'K'], open: true }, slots: { default: () => 'Hover me' } }]
['with text', { props: { text: 'Tooltip', open: true } }],
['with arrow', { props: { text: 'Tooltip', arrow: true, open: true } }],
['with shortcuts', { props: { text: 'Tooltip', shortcuts: ['⌘', 'K'], open: true } }]
])('renders %s correctly', async (nameOrHtml: string, options: { props?: TooltipProps, slots?: any }) => {
const html = await ComponentRender(nameOrHtml, options, TooltipWrapper)
expect(html).toMatchSnapshot()