{{ true ? 123 as number : 0 }}
`,
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()
})
})