]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test(dom): test using innerHTML as template. (#372)
author大江东去 <6405352+dlxqlig@users.noreply.github.com>
Fri, 25 Oct 2019 14:18:46 +0000 (22:18 +0800)
committerEvan You <yyx990803@gmail.com>
Fri, 25 Oct 2019 14:18:46 +0000 (10:18 -0400)
packages/vue/__tests__/index.spec.ts

index b6676b1fe8aa8490d3d042e93b06ba5ba58fdc19..e560a0dff05876821d2d9a7889fa71482866974e 100644 (file)
@@ -45,4 +45,17 @@ describe('compiler + runtime integration', () => {
     app.mount(App, container)
     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')
+  })
 })