1+ import logging from './logging' ;
12import setup from './setup' ;
23
34const { stepFunctionsOfflinePlugin, StepFunctionsOfflinePlugin, serverless } = setup ( ) ;
@@ -65,13 +66,13 @@ describe('index.js', () => {
6566 } ) ;
6667
6768 it ( 'should apply event file ' , async ( ) => {
68- const SFOP = new StepFunctionsOfflinePlugin ( serverless , { e : 'src/__tests__/eventFile.json' } ) ;
69+ const SFOP = new StepFunctionsOfflinePlugin ( serverless , { e : 'src/__tests__/eventFile.json' } , logging ) ;
6970 await SFOP . hooks [ global [ 'hooks' ] . loadEventFile ] ( ) ;
7071 expect ( SFOP . loadedEventFile ) . toMatchObject ( { foo : 1 , bar : 2 } ) ;
7172 } ) ;
7273
7374 it ( 'should throw error - incorrect path to event file ' , ( ) => {
74- const SFOP = new StepFunctionsOfflinePlugin ( serverless , { event : '../__tests__/eventFile2.json' } ) ;
75+ const SFOP = new StepFunctionsOfflinePlugin ( serverless , { event : '../__tests__/eventFile2.json' } , logging ) ;
7576 expect ( SFOP . hooks [ global [ 'hooks' ] . loadEventFile ] ) . rejects . toEqual (
7677 expect . objectContaining ( { code : 'MODULE_NOT_FOUND' } )
7778 ) ;
@@ -94,7 +95,7 @@ describe('index.js', () => {
9495 } ) ;
9596
9697 it ( 'should throw error - incorrect path to event file ' , ( ) => {
97- const SFOP = new StepFunctionsOfflinePlugin ( serverless , { event : '..__tests__/eventFile.json' } ) ;
98+ const SFOP = new StepFunctionsOfflinePlugin ( serverless , { event : '..__tests__/eventFile.json' } , logging ) ;
9899 expect ( SFOP . hooks [ global [ 'hooks' ] . loadEventFile ] ) . rejects . toEqual (
99100 expect . objectContaining ( { code : 'MODULE_NOT_FOUND' } )
100101 ) ;
0 commit comments