2
0
Эх сурвалжийг харах

chore: fix vapor apiExpose test

Evan You 1 жил өмнө
parent
commit
b191beb876

+ 5 - 4
packages/runtime-vapor/__tests__/apiExpose.spec.ts

@@ -54,16 +54,17 @@ describe('api: expose', () => {
   })
   })
 
 
   test('with mount', () => {
   test('with mount', () => {
-    const { instance } = define({
+    const { app, host } = define({
       setup(_, { expose }) {
       setup(_, { expose }) {
         expose({
         expose({
           foo: 1,
           foo: 1,
         })
         })
         return []
         return []
       },
       },
-    }).render()
-    expect(instance!.foo).toBe(1)
-    expect(instance!.bar).toBe(undefined)
+    }).create()
+    const exposed = app.mount(host) as any
+    expect(exposed.foo).toBe(1)
+    expect(exposed.bar).toBe(undefined)
   })
   })
 
 
   test('warning for ref', () => {
   test('warning for ref', () => {