import { ref } from 'vue'
import { mount } from '@vue/test-utils'
import { describe, expect, test } from 'vitest'
import Audio from '../src/audio.vue'
// import type { VNode } from 'vue';

// const _mount = (render: () => VNode) => {
//     return mount(render, { attachTo: document.body })
//   }

describe('Audio.vue', () => {
    //   test('render test', async () => {
    //     const AudioSrc = '';
    //     const wrapper = mount(() => <Audio src={AudioSrc}></Audio>);
    //     await nextTick();
    //   });

    test('play', async () => {
        const radio = ref('')
        const wrapper = mount(() => <Audio v-model={radio.value} />)
        await wrapper.trigger('click')
        expect(radio.value).toBe('')
        expect(wrapper.classes()).toContain('is-disabled')
    })
})
