Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

test: added directives unit test #73

Closed
wants to merge 12 commits into from
18 changes: 4 additions & 14 deletions packages/runtime-vapor/__tests__/component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,14 @@ import {
ref,
unmountComponent,
} from '../src'
import { afterEach, beforeEach, describe, expect } from 'vitest'
import { describe, expect } from 'vitest'
import { defineComponent } from '@vue/runtime-core'
import { setupHostElm } from '../../../scripts/setupVitest'

let host: HTMLElement

const initHost = () => {
host = document.createElement('div')
host.setAttribute('id', 'host')
document.body.appendChild(host)
}
beforeEach(() => {
initHost()
})
afterEach(() => {
host.remove()
})
const { getHost } = setupHostElm()
describe('component', () => {
test('unmountComponent', async () => {
const host = getHost()
const Comp = defineComponent({
setup() {
const count = ref(0)
Expand Down
Loading