import { resolve } from 'pathe' import { describe, expect, it } from 'vitest' import { transform } from '../../src/utils/transformers' describe('transformSFC', () => { it('basic', async () => { const result = await transform({ filename: 'app.vue', raw: ` `, config: {}, }) expect(result).toMatchSnapshot() }) it('defineProps', async () => { const result = await transform({ filename: 'app.vue', raw: ` `, config: {}, }) expect(result).toMatchSnapshot() }) it('defineProps with withDefaults', async () => { const result = await transform({ filename: 'app.vue', raw: ` `, config: {}, }) expect(result).toMatchSnapshot() }) it('defineProps with external props', async () => { const result = await transform({ filename: resolve(__dirname, './test.vue'), raw: ` `, config: {}, }) expect(result).toMatchSnapshot() }) it('defineProps with package props', async () => { const result = await transform({ filename: resolve(__dirname, './test.vue'), raw: ` `, config: {}, }) // TODO: We need to improve this. https://github.com/radix-vue/shadcn-vue/issues/187 expect(result).toMatchSnapshot() }) it('defineEmits', async () => { const result = await transform({ filename: 'app.vue', raw: ` `, config: {}, }) expect(result).toMatchSnapshot() }) })