File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11{
2- "presets" : [" es2015" ],
3- "sourceMaps" : true
2+ "presets" : [" env" ],
3+ "sourceMaps" : true ,
4+ "plugins" : [" transform-object-rest-spread" ]
45}
Original file line number Diff line number Diff line change 3636 "babel-cli" : " ^6.18.0" ,
3737 "babel-core" : " ^6.17.0" ,
3838 "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" ,
4041 "babel-register" : " ^6.18.0" ,
4142 "bluebird" : " ^3.5.0" ,
4243 "chai" : " ^3.5.0" ,
Original file line number Diff line number Diff line change @@ -323,13 +323,15 @@ describe('(unit) src/helper.js', () => {
323323 const comp = base . compose ( {
324324 r1 : { resolve : ( ) => { throw Error ( 'some other error' ) } , error : ( ) => compositionErr } ,
325325 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?
327327 } ) ;
328328
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 ) ;
333335
334336 } ) ;
335337
You can’t perform that action at this time.
0 commit comments