|
@@ -22,10 +22,9 @@ describe('compile class', () => {
|
|
|
expect(errors).toEqual([])
|
|
expect(errors).toEqual([])
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- it('should compile data bindings with static children', () => {
|
|
|
|
|
|
|
+ it('should compile data bindings with children', () => {
|
|
|
const { render, staticRenderFns, errors } = compile(`<foo :a="b"><text>Hello</text></foo>`)
|
|
const { render, staticRenderFns, errors } = compile(`<foo :a="b"><text>Hello</text></foo>`)
|
|
|
- expect(render).toEqual(`with(this){return _h('foo',{attrs:{"a":b}},[_m(0)])}`)
|
|
|
|
|
- expect(staticRenderFns).toEqual([`with(this){return _h('text',["Hello"])}`])
|
|
|
|
|
|
|
+ expect(render).toEqual(`with(this){return _h('foo',{attrs:{"a":b}},[_h('text',["Hello"])])}`)
|
|
|
expect(errors).toEqual([])
|
|
expect(errors).toEqual([])
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -38,8 +37,7 @@ describe('compile class', () => {
|
|
|
<text style="margin-left:36px;color:#eee;">Load more...</text>
|
|
<text style="margin-left:36px;color:#eee;">Load more...</text>
|
|
|
</refresh>
|
|
</refresh>
|
|
|
`)
|
|
`)
|
|
|
- expect(render).toEqual(`with(this){return _h('refresh',{staticClass:["refresh"],staticStyle:{flexDirection:"row"},attrs:{"display":displayRefresh},on:{"refresh":handleRefresh}},[_h('loading-indicator'),_m(0)])}`)
|
|
|
|
|
- expect(staticRenderFns).toEqual([`with(this){return _h('text',{staticStyle:{marginLeft:"36px",color:"#eee"}},["Load more..."])}`])
|
|
|
|
|
|
|
+ expect(render).toEqual(`with(this){return _h('refresh',{staticClass:["refresh"],staticStyle:{flexDirection:"row"},attrs:{"display":displayRefresh},on:{"refresh":handleRefresh}},[_h('loading-indicator'),_h('text',{staticStyle:{marginLeft:"36px",color:"#eee"}},["Load more..."])])}`)
|
|
|
expect(errors).toEqual([])
|
|
expect(errors).toEqual([])
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|