File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
packages/runtime-vapor/__tests__ Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 11import {
2+ type VaporDirective ,
23 createComponent ,
34 createTextNode ,
45 createVaporApp ,
56 defineVaporComponent ,
6- // @ts -expect-error
7- withDirectives ,
7+ template ,
8+ withVaporDirectives ,
89} from '../src'
910import {
1011 type GenericComponentInstance ,
@@ -158,18 +159,17 @@ describe('api: createVaporApp', () => {
158159 expect ( host . innerHTML ) . toBe ( `foobar!barbaz!` )
159160 } )
160161
161- test . todo ( 'directive' , ( ) => {
162+ test ( 'directive' , ( ) => {
162163 const spy1 = vi . fn ( )
163164 const spy2 = vi . fn ( )
164165
165166 const { app, mount } = define ( {
166167 setup ( ) {
167- const FooBar = resolveDirective ( 'foo-bar' )
168- const BarBaz = resolveDirective ( 'bar-baz' )
169- return withDirectives ( document . createElement ( 'div' ) , [
170- [ FooBar ] ,
171- [ BarBaz ] ,
172- ] )
168+ const FooBar = resolveDirective ( 'foo-bar' ) as VaporDirective
169+ const BarBaz = resolveDirective ( 'bar-baz' ) as VaporDirective
170+ const n0 = template ( '<div></div>' ) ( ) as Element
171+ withVaporDirectives ( n0 , [ [ FooBar ] , [ BarBaz ] ] )
172+ return n0
173173 } ,
174174 } ) . create ( )
175175
You can’t perform that action at this time.
0 commit comments