Skip to content

Commit

Permalink
test: add test for SFC in script setup
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 committed Oct 11, 2020
1 parent 3172cfe commit 26deb2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/__projects__/basic/components/ScriptSetup.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<template>
<button @click="increase">Count: {{ num }}</button>
<Basic />
<span>{{ msg }}</span>
</template>

<script setup="props, { emit }" lang="ts">
export { default as Basic } from './Basic.vue'
import { ref } from 'vue'
export const num = ref(5)
const greet = () => console.log('greet')
Expand Down
1 change: 1 addition & 0 deletions e2e/__projects__/basic/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function mount(Component, props, slots) {
test('supports <script setup>', () => {
mount(ScriptSetup)
expect(document.body.outerHTML).toContain('Count: 5')
expect(document.body.outerHTML).toContain('Welcome to Your Vue.js App')
})

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

0 comments on commit 26deb2b

Please sign in to comment.