Skip to content

Commit d14c5d9

Browse files
GaoNeng-wWwsxzz
andauthored
test(runtime-vapor): globalProperty (#255)
Co-authored-by: 三咲智子 Kevin Deng <sxzz@sxzz.moe>
1 parent b44ca85 commit d14c5d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/runtime-vapor/__tests__/apiCreateVaporApp.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,4 +332,16 @@ describe('api: createVaporApp', () => {
332332
expect(window.performance.getEntries()).lengthOf(0)
333333
})
334334
})
335+
336+
test('config.globalProperty', () => {
337+
const { app, mount, html } = define({
338+
render() {
339+
const instance = getCurrentInstance()!
340+
return createTextNode([instance.appContext.config.globalProperties.msg])
341+
},
342+
}).create()
343+
app.config.globalProperties.msg = 'hello world'
344+
mount()
345+
expect(html()).toBe('hello world')
346+
})
335347
})

0 commit comments

Comments
 (0)