Skip to content

Commit 9463ac8

Browse files
committed
test: fix weex tests
1 parent f0a66c5 commit 9463ac8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: test/weex/compiler/compile.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ describe('compile basic', () => {
3232

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

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

@@ -54,7 +54,7 @@ describe('compile basic', () => {
5454
</div>
5555
</div>
5656
`)
57-
expect(complexCase.render).toMatch(strToRegExp(`return _m(0)`))
57+
expect(complexCase.render).toMatch(strToRegExp(`return _m(0,false,false)`))
5858
expect(complexCase.staticRenderFns).toMatch(strToRegExp(`_c('image',{attrs:{"src":"path"}}),_c('image'),_c('div'`))
5959
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")])]`))
6060
expect(complexCase.errors).toEqual([])

0 commit comments

Comments
 (0)