Skip to content

Commit b872fc3

Browse files
committed
test: add
1 parent a3721e1 commit b872fc3

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
@@ -1625,6 +1625,7 @@ export default /*#__PURE__*/_defineComponent({
16251625
literalUnionNumber: { type: Number, required: true },
16261626
literalUnionMixed: { type: [String, Number, Boolean], required: true },
16271627
intersection: { type: Object, required: true },
1628+
intersection2: { type: String, required: true },
16281629
foo: { type: [Function, null], required: true }
16291630
},
16301631
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
@@ -970,6 +970,7 @@ const emit = defineEmits(['a', 'b'])
970970
literalUnionNumber: 1 | 2 | 3 | 4 | 5
971971
literalUnionMixed: 'foo' | 1 | boolean
972972
intersection: Test & {}
973+
intersection2: 'foo' & ('foo' | 'bar')
973974
foo: ((item: any) => boolean) | null
974975
}>()
975976
</script>`)
@@ -1008,6 +1009,7 @@ const emit = defineEmits(['a', 'b'])
10081009
`literalUnionMixed: { type: [String, Number, Boolean], required: true }`
10091010
)
10101011
expect(content).toMatch(`intersection: { type: Object, required: true }`)
1012+
expect(content).toMatch(`intersection2: { type: String, required: true }`)
10111013
expect(content).toMatch(`foo: { type: [Function, null], required: true }`)
10121014
expect(bindings).toStrictEqual({
10131015
string: BindingTypes.PROPS,
@@ -1036,6 +1038,7 @@ const emit = defineEmits(['a', 'b'])
10361038
literalUnionNumber: BindingTypes.PROPS,
10371039
literalUnionMixed: BindingTypes.PROPS,
10381040
intersection: BindingTypes.PROPS,
1041+
intersection2: BindingTypes.PROPS,
10391042
foo: BindingTypes.PROPS
10401043
})
10411044
})

0 commit comments

Comments
 (0)