test(dom): test using innerHTML as template. (#372)

This commit is contained in:
大江东去 2019-10-25 22:18:46 +08:00 committed by Evan You
parent 57276f9dcb
commit a75077569e

View File

@ -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')
})
}) })