@@ -408,33 +408,29 @@ describe('ServerlessStepFunctions', () => {
408408 } ) ;
409409
410410 describe ( '#parseInputdate()' , ( ) => {
411- let fileExistsSyncStub ;
412- let readFileSyncStub ;
413411 beforeEach ( ( ) => {
414412 serverlessStepFunctions . serverless . config . servicePath = 'servicePath' ;
415- fileExistsSyncStub = sinon . stub ( serverlessStepFunctions . serverless . utils , 'fileExistsSync' )
416- . returns ( true ) ;
417- readFileSyncStub = sinon . stub ( serverlessStepFunctions . serverless . utils , 'readFileSync' )
413+ sinon . stub ( serverlessStepFunctions . serverless . utils , 'fileExistsSync' ) . returns ( true ) ;
414+ sinon . stub ( serverlessStepFunctions . serverless . utils , 'readFileSync' )
418415 . returns ( { foo : 'var' } ) ;
419416 serverlessStepFunctions . options . data = null ;
420417 serverlessStepFunctions . options . path = 'data.json' ;
421418 } ) ;
422419
423420 it ( 'should throw error if file does not exists' , ( ) => {
424421 serverlessStepFunctions . serverless . utils . fileExistsSync . restore ( ) ;
425- fileExistsSyncStub = sinon . stub ( serverlessStepFunctions . serverless . utils , 'fileExistsSync' )
426- . returns ( false ) ;
422+ sinon . stub ( serverlessStepFunctions . serverless . utils , 'fileExistsSync' ) . returns ( false ) ;
427423 expect ( ( ) => serverlessStepFunctions . parseInputdate ( ) ) . to . throw ( Error ) ;
428424 serverlessStepFunctions . serverless . utils . readFileSync . restore ( ) ;
429425 } ) ;
430426
431- it ( 'should parse file if path param is provided' , ( ) => {
432- return serverlessStepFunctions . parseInputdate ( ) . then ( ( ) => {
427+ it ( 'should parse file if path param is provided'
428+ , ( ) => serverlessStepFunctions . parseInputdate ( ) . then ( ( ) => {
433429 expect ( serverlessStepFunctions . options . data ) . to . deep . equal ( '{"foo":"var"}' ) ;
434430 serverlessStepFunctions . serverless . utils . fileExistsSync . restore ( ) ;
435431 serverlessStepFunctions . serverless . utils . readFileSync . restore ( ) ;
436- } ) ;
437- } ) ;
432+ } )
433+ ) ;
438434
439435 it ( 'should return resolve if path param is not provided' , ( ) => {
440436 serverlessStepFunctions . options . path = null ;
0 commit comments