test(runtime-core): test app API warnings (#2079)
This commit is contained in:
parent
c65d6def84
commit
0cddde6aa4
@ -58,6 +58,11 @@ describe('api: createApp', () => {
|
||||
|
||||
const root = nodeOps.createElement('div')
|
||||
const app = createApp(Comp)
|
||||
|
||||
// warning
|
||||
app.unmount(root)
|
||||
expect(`that is not mounted`).toHaveBeenWarned()
|
||||
|
||||
app.mount(root)
|
||||
|
||||
app.unmount(root)
|
||||
@ -92,6 +97,11 @@ describe('api: createApp', () => {
|
||||
app.mount(root)
|
||||
expect(serializeInner(root)).toBe(`3,2`)
|
||||
expect('[Vue warn]: injection "__proto__" not found.').toHaveBeenWarned()
|
||||
|
||||
const app2 = createApp(Root)
|
||||
app2.provide('bar', 1)
|
||||
app2.provide('bar', 2)
|
||||
expect(`App already provides property with key "bar".`).toHaveBeenWarned()
|
||||
})
|
||||
|
||||
test('component', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user