@@ -22,6 +22,7 @@ import { randomExport } from './components/NamedExport.vue'
2222import ScriptSetup from './components/ScriptSetup.vue'
2323import ScriptSetupSugarRef from './components/ScriptSetupSugarRef.vue'
2424import FunctionalRenderFn from './components/FunctionalRenderFn.vue'
25+ import CompilerDirective from './components/CompilerDirective.vue'
2526
2627// TODO: JSX for Vue 3? TSX?
2728import Jsx from './components/Jsx.vue'
@@ -36,7 +37,9 @@ function mount(Component, props, slots) {
3637 return h ( Component , props , slots )
3738 }
3839 }
39- createApp ( Parent ) . mount ( el )
40+ const app = createApp ( Parent )
41+ app . directive ( 'test' , el => el . setAttribute ( 'data-test' , 'value' ) )
42+ app . mount ( el )
4043}
4144
4245test ( 'supports <script setup>' , ( ) => {
@@ -197,3 +200,10 @@ test('processes functional component exported as function', () => {
197200 expect ( elem ) . toBeTruthy ( )
198201 expect ( elem . innerHTML ) . toBe ( 'Nyan' )
199202} )
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