File tree Expand file tree Collapse file tree
x-pack/plugins/apm/server/lib/search_strategies Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ describe('search service', () => {
1515 it ( 'returns the current time as a string' , ( ) => {
1616 const mockDate = new Date ( 1392202800000 ) ;
1717 // @ts -ignore ignore the mockImplementation callback error
18- const spy = jest . spyOn ( global , 'Date' ) . mockImplementation ( ( ) => mockDate ) ;
18+ const spy = jest . spyOn ( global , 'Date' ) . mockReturnValue ( mockDate ) ;
1919
2020 const timeString = currentTimeAsString ( ) ;
2121
@@ -31,7 +31,7 @@ describe('search service', () => {
3131
3232 const mockDate = new Date ( 1392202800000 ) ;
3333 // @ts -ignore ignore the mockImplementation callback error
34- const spy = jest . spyOn ( global , 'Date' ) . mockImplementation ( ( ) => mockDate ) ;
34+ const spy = jest . spyOn ( global , 'Date' ) . mockReturnValue ( mockDate ) ;
3535
3636 addLogMessage ( 'the first message' ) ;
3737 addLogMessage ( 'the second message' ) ;
You can’t perform that action at this time.
0 commit comments