Skip to content

Commit 904d9c9

Browse files
committed
test: fix weex test case
1 parent 5875c7c commit 904d9c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/weex/compiler/compile.spec.js

Lines changed: 3 additions & 3 deletions
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,false,false)`))
35+
expect(inputCase.render).toMatch(strToRegExp(`return _m(0)`))
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,false,false)`))
40+
expect(imageCase.render).toMatch(strToRegExp(`return _m(0)`))
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,false,false)`))
57+
expect(complexCase.render).toMatch(strToRegExp(`return _m(0)`))
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy