]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: fix vapor apiExpose test
authorEvan You <evan@vuejs.org>
Tue, 10 Dec 2024 13:39:09 +0000 (21:39 +0800)
committerEvan You <evan@vuejs.org>
Tue, 10 Dec 2024 13:39:09 +0000 (21:39 +0800)
packages/runtime-vapor/__tests__/apiExpose.spec.ts

index 8431d2c07f91029538882210ddc17c38e6151706..c521c3e397f676525f739689d8485420bad2c783 100644 (file)
@@ -54,16 +54,17 @@ describe('api: expose', () => {
   })
 
   test('with mount', () => {
-    const { instance } = define({
+    const { app, host } = define({
       setup(_, { expose }) {
         expose({
           foo: 1,
         })
         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', () => {