test(dom): test using innerHTML as template. (#372)
This commit is contained in:
parent
57276f9dcb
commit
a75077569e
@ -45,4 +45,17 @@ describe('compiler + runtime integration', () => {
|
|||||||
app.mount(App, container)
|
app.mount(App, container)
|
||||||
expect(container.innerHTML).toBe('<custom></custom>')
|
expect(container.innerHTML).toBe('<custom></custom>')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('should support using element innerHTML as template', () => {
|
||||||
|
const app = createApp()
|
||||||
|
let container = document.createElement('div')
|
||||||
|
container.innerHTML = '{{msg}}'
|
||||||
|
const App = {
|
||||||
|
data: {
|
||||||
|
msg: 'hello'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
app.mount(App, container)
|
||||||
|
expect(container.innerHTML).toBe('hello')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user