Skip to content

Commit 26deb2b

Browse files
committed
test: add test for SFC in script setup
1 parent 3172cfe commit 26deb2b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

e2e/__projects__/basic/components/ScriptSetup.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<template>
22
<button @click="increase">Count: {{ num }}</button>
3+
<Basic />
34
<span>{{ msg }}</span>
45
</template>
56

67
<script setup="props, { emit }" lang="ts">
8+
export { default as Basic } from './Basic.vue'
9+
710
import { ref } from 'vue'
811
export const num = ref(5)
912
const greet = () => console.log('greet')

e2e/__projects__/basic/test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ function mount(Component, props, slots) {
3636
test('supports <script setup>', () => {
3737
mount(ScriptSetup)
3838
expect(document.body.outerHTML).toContain('Count: 5')
39+
expect(document.body.outerHTML).toContain('Welcome to Your Vue.js App')
3940
})
4041

4142
test('processes .vue files', () => {

0 commit comments

Comments
 (0)