@@ -3,7 +3,6 @@ import { DEFAULT_ENV, Runtime, Instance } from 'weex-vdom-tester'
3
3
import { config } from 'weex-js-runtime'
4
4
5
5
import {
6
- createInstance ,
7
6
syncPromise ,
8
7
checkRefresh
9
8
} from '../helpers/index'
@@ -231,7 +230,7 @@ describe('framework APIs', () => {
231
230
232
231
const textRef = Vue . getRoot ( instance . id ) . children [ 0 ] . ref
233
232
Vue . receiveTasks ( instance . id , [
234
- { method : 'fireEvent' , args : [ textRef , 'click' ] }
233
+ { method : 'fireEvent' , args : [ textRef , 'click' ] }
235
234
] )
236
235
237
236
setTimeout ( ( ) => {
@@ -246,7 +245,7 @@ describe('framework APIs', () => {
246
245
247
246
Vue . destroyInstance ( instance . id )
248
247
const result = Vue . receiveTasks ( instance . id , [
249
- { method : 'fireEvent' , args : [ textRef , 'click' ] }
248
+ { method : 'fireEvent' , args : [ textRef , 'click' ] }
250
249
] )
251
250
expect ( result instanceof Error ) . toBe ( true )
252
251
expect ( result ) . toMatch ( / r e c e i v e T a s k s / )
@@ -301,7 +300,7 @@ describe('framework APIs', () => {
301
300
}
302
301
} )
303
302
Vue . receiveTasks ( instance . id , [
304
- { method : 'callback' , args : [ callbackId , undefined , true ] }
303
+ { method : 'callback' , args : [ callbackId , undefined , true ] }
305
304
] )
306
305
307
306
setTimeout ( ( ) => {
@@ -314,7 +313,7 @@ describe('framework APIs', () => {
314
313
} )
315
314
316
315
Vue . receiveTasks ( instance . id , [
317
- { method : 'callback' , args : [ callbackId , { value : 'Weex' } , true ] }
316
+ { method : 'callback' , args : [ callbackId , { value : 'Weex' } , true ] }
318
317
] )
319
318
setTimeout ( ( ) => {
320
319
expect ( instance . getRealRoot ( ) ) . toEqual ( {
@@ -326,7 +325,7 @@ describe('framework APIs', () => {
326
325
} )
327
326
328
327
Vue . receiveTasks ( instance . id , [
329
- { method : 'callback' , args : [ callbackId ] }
328
+ { method : 'callback' , args : [ callbackId ] }
330
329
] )
331
330
setTimeout ( ( ) => {
332
331
expect ( instance . getRealRoot ( ) ) . toEqual ( {
@@ -339,7 +338,7 @@ describe('framework APIs', () => {
339
338
340
339
Vue . destroyInstance ( instance . id )
341
340
const result = Vue . receiveTasks ( instance . id , [
342
- { method : 'callback' , args : [ callbackId ] }
341
+ { method : 'callback' , args : [ callbackId ] }
343
342
] )
344
343
expect ( result instanceof Error ) . toBe ( true )
345
344
expect ( result ) . toMatch ( / r e c e i v e T a s k s / )
@@ -399,14 +398,14 @@ describe('framework APIs', () => {
399
398
} ]
400
399
} )
401
400
402
- expect ( instance . history . callNative .
403
- filter ( task => task . module === 'foo' ) .
404
- map ( task => `${ task . method } (${ task . args } )` )
401
+ expect ( instance . history . callNative
402
+ . filter ( task => task . module === 'foo' )
403
+ . map ( task => `${ task . method } (${ task . args } )` )
405
404
) . toEqual ( [ 'a(1,2,true)' ] )
406
405
407
- expect ( instance . history . callNative .
408
- filter ( task => task . module === 'bar' ) .
409
- map ( task => `${ task . method } (${ task . args } )` )
406
+ expect ( instance . history . callNative
407
+ . filter ( task => task . module === 'bar' )
408
+ . map ( task => `${ task . method } (${ task . args } )` )
410
409
) . toEqual ( [ 'b(1)' ] )
411
410
} )
412
411
0 commit comments