index.spec.ts 392 B

123456789101112131415161718
  1. import * as Vue from '../src'
  2. import { createApp } from '../src'
  3. ;(window as any).Vue = Vue
  4. it('should support on-the-fly template compilation', () => {
  5. const container = document.createElement('div')
  6. const App = {
  7. template: `{{ count }}`,
  8. data() {
  9. return {
  10. count: 0
  11. }
  12. }
  13. }
  14. createApp().mount(App, container)
  15. expect(container.innerHTML).toBe(`0`)
  16. })