From 3611f07d9302c27587cb89b127dc880461880574 Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Thu, 11 Apr 2024 11:29:08 +0200 Subject: [PATCH] test(Tooltip): wrap with `TooltipProvider` instead of `UApp` --- test/components/Tooltip.spec.ts | 6 ++--- .../__snapshots__/Tooltip.spec.ts.snap | 27 +++++-------------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/test/components/Tooltip.spec.ts b/test/components/Tooltip.spec.ts index 5ece0b7a..fd8fd1db 100644 --- a/test/components/Tooltip.spec.ts +++ b/test/components/Tooltip.spec.ts @@ -1,16 +1,16 @@ import { defineComponent } from 'vue' import { describe, it, expect } from 'vitest' -import App from '../../src/runtime/components/App.vue' +import { TooltipProvider } from 'radix-vue' import Tooltip, { type TooltipProps } from '../../src/runtime/components/Tooltip.vue' import ComponentRender from '../component-render' const TooltipWrapper = defineComponent({ components: { - UApp: App, + TooltipProvider, UTooltip: Tooltip }, inheritAttrs: false, - template: '' + template: '' }) describe('Tooltip', () => { diff --git a/test/components/__snapshots__/Tooltip.spec.ts.snap b/test/components/__snapshots__/Tooltip.spec.ts.snap index de356f9e..f6543dac 100644 --- a/test/components/__snapshots__/Tooltip.spec.ts.snap +++ b/test/components/__snapshots__/Tooltip.spec.ts.snap @@ -6,17 +6,12 @@ exports[`Tooltip > renders with arrow correctly 1`] = `
Tooltip - Tooltipv-if + Tooltipv-if
- -
- -
    - -
    " +" `; exports[`Tooltip > renders with shortcuts correctly 1`] = ` @@ -25,17 +20,12 @@ exports[`Tooltip > renders with shortcuts correctly 1`] = `
    Tooltip - Tooltipv-if + Tooltipv-if
    - -
    - -
      - -
      " +" `; exports[`Tooltip > renders with text correctly 1`] = ` @@ -45,15 +35,10 @@ exports[`Tooltip > renders with text correctly 1`] = `
      Tooltip - Tooltipv-ifv-if + Tooltipv-ifv-if
      - -
      - -
        - -
        " +" `;