Skip to content

Commit

Permalink
test: fix weex tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Nov 7, 2017
1 parent f0a66c5 commit 9463ac8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/weex/compiler/compile.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ describe('compile basic', () => {

it('should compile unary tag', () => {
const inputCase = compile(`<div><input><text>abc</text></div>`)
expect(inputCase.render).toMatch(strToRegExp(`return _m(0)`))
expect(inputCase.render).toMatch(strToRegExp(`return _m(0,false,false)`))
expect(inputCase.staticRenderFns).toMatch(strToRegExp(`_c('div',[_c('input'),_c('text',[_v("abc")])])`))
expect(inputCase.errors).toEqual([])

const imageCase = compile(`<div><image src="path"><text>abc</text></div>`)
expect(imageCase.render).toMatch(strToRegExp(`return _m(0)`))
expect(imageCase.render).toMatch(strToRegExp(`return _m(0,false,false)`))
expect(imageCase.staticRenderFns).toMatch(strToRegExp(`_c('div',[_c('image',{attrs:{"src":"path"}}),_c('text',[_v("abc")])])`))
expect(imageCase.errors).toEqual([])

Expand All @@ -54,7 +54,7 @@ describe('compile basic', () => {
</div>
</div>
`)
expect(complexCase.render).toMatch(strToRegExp(`return _m(0)`))
expect(complexCase.render).toMatch(strToRegExp(`return _m(0,false,false)`))
expect(complexCase.staticRenderFns).toMatch(strToRegExp(`_c('image',{attrs:{"src":"path"}}),_c('image'),_c('div'`))
expect(complexCase.staticRenderFns).toMatch(strToRegExp(`_c('div',[_c('embed'),_c('text',[_v("start")]),_c('input',{attrs:{"type":"text"}}),_c('input',{attrs:{"type":"url"}}),_c('text',[_v("end")])]`))
expect(complexCase.errors).toEqual([])
Expand Down

0 comments on commit 9463ac8

Please sign in to comment.