Skip to content

Commit 81dadd2

Browse files
committed
test: add
1 parent 9496e7b commit 81dadd2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/compiler-sfc/__tests__/__snapshots__/compileScript.spec.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,7 @@ export default /*#__PURE__*/_defineComponent({
16081608
literalUnionNumber: { type: Number, required: true },
16091609
literalUnionMixed: { type: [String, Number, Boolean], required: true },
16101610
intersection: { type: Object, required: true },
1611+
intersection2: { type: String, required: true },
16111612
foo: { type: [Function, null], required: true }
16121613
},
16131614
setup(__props: any, { expose }) {

packages/compiler-sfc/__tests__/compileScript.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ const emit = defineEmits(['a', 'b'])
904904
literalUnionNumber: 1 | 2 | 3 | 4 | 5
905905
literalUnionMixed: 'foo' | 1 | boolean
906906
intersection: Test & {}
907+
intersection2: 'foo' & ('foo' | 'bar')
907908
foo: ((item: any) => boolean) | null
908909
}>()
909910
</script>`)
@@ -939,6 +940,7 @@ const emit = defineEmits(['a', 'b'])
939940
`literalUnionMixed: { type: [String, Number, Boolean], required: true }`
940941
)
941942
expect(content).toMatch(`intersection: { type: Object, required: true }`)
943+
expect(content).toMatch(`intersection2: { type: String, required: true }`)
942944
expect(content).toMatch(`foo: { type: [Function, null], required: true }`)
943945
expect(bindings).toStrictEqual({
944946
string: BindingTypes.PROPS,
@@ -966,6 +968,7 @@ const emit = defineEmits(['a', 'b'])
966968
literalUnionNumber: BindingTypes.PROPS,
967969
literalUnionMixed: BindingTypes.PROPS,
968970
intersection: BindingTypes.PROPS,
971+
intersection2: BindingTypes.PROPS,
969972
foo: BindingTypes.PROPS
970973
})
971974
})

0 commit comments

Comments
 (0)