import { compile } from '../../../packages/weex-template-compiler' describe('compile class', () => { it('should be compiled', () => { const { render, staticRenderFns, errors } = compile(`
`) expect(render).toEqual(`with(this){return _m(0)}`) expect(staticRenderFns).toEqual([`with(this){return _h('div')}`]) expect(errors).toEqual([]) }) it('should compile data bindings', () => { const { render, staticRenderFns, errors } = compile(``) expect(render).toEqual(`with(this){return _h('div',{attrs:{"a":b}})}`) expect(staticRenderFns).toEqual([]) expect(errors).toEqual([]) }) it('should compile event bindings', () => { const { render, staticRenderFns, errors } = compile(``) expect(render).toEqual(`with(this){return _h('div',{on:{"click":x}})}`) expect(staticRenderFns).toEqual([]) expect(errors).toEqual([]) }) it('should compile data bindings with static children', () => { const { render, staticRenderFns, errors } = compile(`