shadcn-vue/packages/cli/test/utils/__snapshots__/transform-sfc.test.ts.snap
2023-12-21 09:11:07 +08:00

65 lines
1.3 KiB
Plaintext

// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
exports[`transformSFC > basic 1`] = `
"<script setup>
const array = [1, 2, 3];
</script>
<template>
<div v-bind=\\"{ array }\\">template</div>
</template>
<style scoped></style>
"
`;
exports[`transformSFC > defineEmits 1`] = `
"<script setup>
const emit = defineEmits([\\"foo\\"]);
</script>
"
`;
exports[`transformSFC > defineProps 1`] = `
"<script setup>
const props = defineProps({
foo: { type: String, required: true },
});
</script>
"
`;
exports[`transformSFC > defineProps with external props 1`] = `
"<script setup>
const props = defineProps({
foo: { type: String, required: false, default: \\"bar\\" },
a: { type: String, required: true },
b: { type: Number, required: true },
});
export {};
</script>
"
`;
exports[`transformSFC > defineProps with package props 1`] = `
"<script setup>
const props = defineProps({
foo: { type: String, required: false, default: \\"bar\\" },
for: { type: String, required: false },
asChild: { type: Boolean, required: false },
as: { type: null, required: false },
});
export {};
</script>
"
`;
exports[`transformSFC > defineProps with withDefaults 1`] = `
"<script setup>
const props = defineProps({
foo: { type: String, required: true, default: \\"bar\\" },
});
</script>
"
`;