File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "presets" : [" es2015" ],
3
- "sourceMaps" : true
2
+ "presets" : [" env" ],
3
+ "sourceMaps" : true ,
4
+ "plugins" : [" transform-object-rest-spread" ]
4
5
}
Original file line number Diff line number Diff line change 36
36
"babel-cli" : " ^6.18.0" ,
37
37
"babel-core" : " ^6.17.0" ,
38
38
"babel-eslint" : " ^7.0.0" ,
39
- "babel-preset-es2015" : " ^6.16.0" ,
39
+ "babel-plugin-transform-object-rest-spread" : " ^6.26.0" ,
40
+ "babel-preset-env" : " ^1.7.0" ,
40
41
"babel-register" : " ^6.18.0" ,
41
42
"bluebird" : " ^3.5.0" ,
42
43
"chai" : " ^3.5.0" ,
Original file line number Diff line number Diff line change @@ -323,13 +323,15 @@ describe('(unit) src/helper.js', () => {
323
323
const comp = base . compose ( {
324
324
r1 : { resolve : ( ) => { throw Error ( 'some other error' ) } , error : ( ) => compositionErr } ,
325
325
r2 : { resolve : ( ) => 'r2Result' , error : ( ) => compositionErr } ,
326
- r3 : { } // should this throw an exception since it is not a resolver or createResolver params?
326
+ r3 : { } // should we throw an exception since it is not a resolver or createResolver params?
327
327
} ) ;
328
328
329
- console . log ( typeof Function ) ;
330
- expect ( comp . r1 ) . to . be . a ( typeof Function ) ;
331
- expect ( comp . r2 ) . to . be . a ( typeof Function ) ;
332
- expect ( comp . r3 ) . to . be . a ( typeof Function ) ;
329
+ const composed = { r0 : ( ) => { } , ...comp } ;
330
+
331
+ expect ( composed . r0 ) . to . be . a ( typeof Function ) ;
332
+ expect ( composed . r1 ) . to . be . a ( typeof Function ) ;
333
+ expect ( composed . r2 ) . to . be . a ( typeof Function ) ;
334
+ expect ( composed . r3 ) . to . be . a ( typeof Function ) ;
333
335
334
336
} ) ;
335
337
You can’t perform that action at this time.
0 commit comments