Skip to content

Commit b01ab03

Browse files
committed
Add test
1 parent c27720a commit b01ab03

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

test/__snapshots__/transform.test.ts.snap

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,28 @@ export default defineConfig({
146146
"
147147
`;
148148
149+
exports[`transform fixtures test/fixtures/AsyncImport.vue 1`] = `
150+
"<script lang=\\"ts\\">
151+
import { defineAsyncComponent } from 'script-setup';
152+
const ScriptOnly = defineAsyncComponent(() => import('./ScriptOnly.vue'));
153+
const __sfc_main = {};
154+
155+
__sfc_main.setup = (__props, __ctx) => {
156+
return {};
157+
};
158+
159+
__sfc_main.components = Object.assign({
160+
ScriptOnly
161+
}, __sfc_main.components);
162+
export default __sfc_main;
163+
</script>
164+
165+
<template>
166+
<ScriptOnly />
167+
</template>
168+
"
169+
`;
170+
149171
exports[`transform fixtures test/fixtures/DynamicStyle.vue 1`] = `
150172
"<template>
151173
<div :style=\\"{ color, border: '1px' }\\" />

test/fixtures/AsyncImport.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script setup lang="ts">
2+
import { defineAsyncComponent } from 'script-setup'
3+
const ScriptOnly = defineAsyncComponent(() => import('./ScriptOnly.vue'))
4+
</script>
5+
6+
<template>
7+
<ScriptOnly />
8+
</template>

0 commit comments

Comments
 (0)