Skip to content

Commit c2be9b0

Browse files
committed
fix(compiler-sfc): updated unit test
1 parent ccb6ce6 commit c2be9b0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ describe('sfc props transform', () => {
100100
})
101101

102102
test('default values w/ type declaration & key is string', () => {
103-
const { content } = compile(`
103+
const { content , bindings} = compile(`
104104
<script setup lang="ts">
105105
const { foo = 1 } = defineProps<{ "foo": number }>()
106106
</script>
107107
`)
108+
expect(bindings).toMatchObject({foo:'props'})
108109
expect(content).toMatch(`
109110
props: {
110111
foo: { type: Number, required: true, default: 1 }

0 commit comments

Comments
 (0)