@@ -22,6 +22,7 @@ import { randomExport } from './components/NamedExport.vue'
22
22
import ScriptSetup from './components/ScriptSetup.vue'
23
23
import ScriptSetupSugarRef from './components/ScriptSetupSugarRef.vue'
24
24
import FunctionalRenderFn from './components/FunctionalRenderFn.vue'
25
+ import CompilerDirective from './components/CompilerDirective.vue'
25
26
26
27
// TODO: JSX for Vue 3? TSX?
27
28
import Jsx from './components/Jsx.vue'
@@ -36,7 +37,9 @@ function mount(Component, props, slots) {
36
37
return h ( Component , props , slots )
37
38
}
38
39
}
39
- createApp ( Parent ) . mount ( el )
40
+ const app = createApp ( Parent )
41
+ app . directive ( 'test' , el => el . setAttribute ( 'data-test' , 'value' ) )
42
+ app . mount ( el )
40
43
}
41
44
42
45
test ( 'supports <script setup>' , ( ) => {
@@ -197,3 +200,10 @@ test('processes functional component exported as function', () => {
197
200
expect ( elem ) . toBeTruthy ( )
198
201
expect ( elem . innerHTML ) . toBe ( 'Nyan' )
199
202
} )
203
+
204
+ test ( 'ensure compilerOptions is passed down' , ( ) => {
205
+ mount ( CompilerDirective )
206
+
207
+ const elm = document . querySelector ( 'h1' )
208
+ expect ( elm . hasAttribute ( 'data-test' ) ) . toBe ( false )
209
+ } )
0 commit comments