From 3fe8d373b40ff96fbdeca899e70a2abcc5994ad9 Mon Sep 17 00:00:00 2001 From: Adam DeHaven Date: Tue, 2 Jan 2024 16:56:09 -0500 Subject: [PATCH] test: add component tests --- src/components/toolbar/InfoTooltip.spec.ts | 14 +++++++------- src/components/toolbar/MarkdownToolbar.spec.ts | 4 ++-- src/components/toolbar/ToolbarButton.spec.ts | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/toolbar/InfoTooltip.spec.ts b/src/components/toolbar/InfoTooltip.spec.ts index d13ded07..6341808d 100644 --- a/src/components/toolbar/InfoTooltip.spec.ts +++ b/src/components/toolbar/InfoTooltip.spec.ts @@ -11,7 +11,7 @@ describe('', () => { const wrapper = await mount(InfoTooltip, { slots: { - default: () => h('button', {}, slotContent), + default: h('button', {}, slotContent), }, }) @@ -35,7 +35,7 @@ describe('', () => { text: tooltip, }, slots: { - default: () => h('button', {}, slotContent), + default: h('button', {}, slotContent), }, }) @@ -55,7 +55,7 @@ describe('', () => { text: tooltip, }, slots: { - default: () => h('button', {}, slotContent), + default: h('button', {}, slotContent), }, }) @@ -77,8 +77,8 @@ describe('', () => { const wrapper = await mount(InfoTooltip, { slots: { - default: () => h('button', {}, slotContent), - tooltip: () => h('div', {}, tooltip), + default: h('button', {}, slotContent), + tooltip: h('div', {}, tooltip), }, }) @@ -95,8 +95,8 @@ describe('', () => { const wrapper = await mount(InfoTooltip, { slots: { - default: () => h('button', {}, slotContent), - tooltip: () => h('div', {}, tooltip), + default: h('button', {}, slotContent), + tooltip: h('div', {}, tooltip), }, }) diff --git a/src/components/toolbar/MarkdownToolbar.spec.ts b/src/components/toolbar/MarkdownToolbar.spec.ts index a947b324..2ce847b7 100644 --- a/src/components/toolbar/MarkdownToolbar.spec.ts +++ b/src/components/toolbar/MarkdownToolbar.spec.ts @@ -249,7 +249,7 @@ describe('', () => { }), }, slots: { - 'editor-actions': () => [ + 'editor-actions': [ h('button', { 'data-testid': 'save' }, saveButtonText), h('button', { 'data-testid': 'cancel' }, cancelButtonText), ], @@ -278,7 +278,7 @@ describe('', () => { }), }, slots: { - 'toolbar-right': () => h('button', { 'data-testid': 'custom' }, buttonText), + 'toolbar-right': h('button', { 'data-testid': 'custom' }, buttonText), }, }) diff --git a/src/components/toolbar/ToolbarButton.spec.ts b/src/components/toolbar/ToolbarButton.spec.ts index 12e48162..b467ae9c 100644 --- a/src/components/toolbar/ToolbarButton.spec.ts +++ b/src/components/toolbar/ToolbarButton.spec.ts @@ -11,7 +11,7 @@ describe('', () => { const wrapper = await mount(ToolbarButton, { slots: { - default: () => h('button', {}, slotContent), + default: h('button', {}, slotContent), }, }) @@ -33,7 +33,7 @@ describe('', () => { icon: false, }, slots: { - default: () => h('button', {}, slotContent), + default: h('button', {}, slotContent), }, }) @@ -53,7 +53,7 @@ describe('', () => { appearance: 'primary', }, slots: { - default: () => h('button', {}, slotContent), + default: h('button', {}, slotContent), }, })