mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
25 lines
454 B
TypeScript
25 lines
454 B
TypeScript
import {
|
|
type RenderOptions,
|
|
render as _render,
|
|
cleanup,
|
|
} from '@testing-library/vue'
|
|
import { VTooltip } from 'floating-vue'
|
|
import { afterEach } from 'vitest'
|
|
|
|
export function render(component: any, options?: RenderOptions) {
|
|
return _render(component, {
|
|
...options,
|
|
global: {
|
|
directives: {
|
|
tooltip: VTooltip,
|
|
},
|
|
},
|
|
})
|
|
}
|
|
|
|
afterEach(() => {
|
|
cleanup()
|
|
})
|
|
|
|
export { within, screen } from '@testing-library/vue'
|