@@ -2,22 +2,23 @@ import { createApp, h } from 'vue'
2
2
import { resolve } from 'path'
3
3
import { readFileSync } from 'fs'
4
4
5
- import BasicSrc from './components/BasicSrc.vue'
6
- import Pug from './components/Pug.vue'
7
- import Coffee from './components/Coffee.vue'
8
- import Basic from './components/Basic.vue'
9
- import TypeScript from './components/TypeScript.vue'
10
- import jestVue from '../../../'
11
- import RenderFunction from './components/RenderFunction.vue'
12
- import FunctionalSFC from './components/FunctionalSFC.vue'
13
- import CoffeeScript from './components/CoffeeScript.vue'
14
- import FunctionalSFCParent from './components/FunctionalSFCParent.vue'
15
- import NoScript from './components/NoScript.vue'
16
- import PugRelative from './components/PugRelativeExtends.vue'
17
- import { randomExport } from './components/NamedExport.vue'
5
+ // import BasicSrc from './components/BasicSrc.vue'
6
+ // import Pug from './components/Pug.vue'
7
+ // import Coffee from './components/Coffee.vue'
8
+ // import Basic from './components/Basic.vue'
9
+ // import TypeScript from './components/TypeScript.vue'
10
+ // import jestVue from '../../../'
11
+ // import RenderFunction from './components/RenderFunction.vue'
12
+ // import FunctionalSFC from './components/FunctionalSFC.vue'
13
+ // import CoffeeScript from './components/CoffeeScript.vue'
14
+ // import FunctionalSFCParent from './components/FunctionalSFCParent.vue'
15
+ // import NoScript from './components/NoScript.vue'
16
+ // import PugRelative from './components/PugRelativeExtends.vue'
17
+ // import { randomExport } from './components/NamedExport.vue'
18
+ import ScriptSetup from './components/ScriptSetup.vue'
18
19
19
20
// TODO: JSX for Vue 3? TSX?
20
- import Jsx from './components/Jsx.vue'
21
+ // import Jsx from './components/Jsx.vue'
21
22
22
23
function mount ( Component , props , slots ) {
23
24
document . getElementsByTagName ( 'html' ) [ 0 ] . innerHTML = ''
@@ -32,6 +33,11 @@ function mount(Component, props, slots) {
32
33
createApp ( Parent ) . mount ( el )
33
34
}
34
35
36
+ test . only ( 'supports <script setup>' , ( ) => {
37
+ mount ( ScriptSetup )
38
+ expect ( document . body . outerHTML ) . toContain ( 'Count: 5' )
39
+ } )
40
+
35
41
test ( 'processes .vue files' , ( ) => {
36
42
mount ( Basic )
37
43
expect ( document . querySelector ( 'h1' ) . textContent ) . toBe (
0 commit comments