chore(sfc-playground): ignore duplicate logs

This commit is contained in:
Evan You
2021-06-25 19:31:47 -04:00
parent 1675b6d723
commit 3ffc7be864
3 changed files with 43 additions and 2 deletions

View File

@@ -19,6 +19,32 @@ describe('defineProps w/ type declaration', () => {
props.bar
})
describe('defineProps w/ type declaration + defaults', () => {
defineProps<{
number?: number
arr?: string[]
arr2?: string[]
obj?: { x: number }
obj2?: { x: number }
obj3?: { x: number }
}>(
{},
{
number: 1,
arr: () => [''],
// @ts-expect-error not using factory
arr2: [''],
obj: () => ({ x: 123 }),
// @ts-expect-error not using factory
obj2: { x: 123 },
// @ts-expect-error factory return type does not match
obj3: () => ({ x: 'foo' })
}
)
})
describe('defineProps w/ runtime declaration', () => {
// runtime declaration
const props = defineProps({