@@ -18,7 +18,7 @@ describe('index', () => {
1818 sandbox . stub ( fs , 'watchFile' ) . callsFake ( ( paramA , paramB , cb ) => {
1919 watchHandler = cb ;
2020 } ) ;
21- sandbox . spy ( fs , 'readFile ' ) ;
21+ sandbox . spy ( fs , 'createReadStream ' ) ;
2222 } ) ;
2323 afterEach ( ( ) => {
2424 sandbox . restore ( ) ;
@@ -51,17 +51,17 @@ describe('index', () => {
5151 const lookup = await maxmind . open ( dbPath , options ) ;
5252 assert ( lookup . get ( '2001:230::' ) ) ;
5353 assert ( ( fs . watchFile as SinonSpy ) . calledOnce ) ;
54- assert ( ( fs . readFile as SinonSpy ) . calledOnce ) ;
54+ assert ( ( fs . createReadStream as SinonSpy ) . calledOnce ) ;
5555 } ) ;
5656
5757 it ( 'should work with auto updates' , async ( ) => {
5858 const options = { watchForUpdates : true } ;
5959 const lookup = await maxmind . open ( dbPath , options ) ;
6060 assert ( lookup . get ( '2001:230::' ) ) ;
6161 assert ( ( fs . watchFile as SinonSpy ) . calledOnce ) ;
62- assert ( ( fs . readFile as SinonSpy ) . calledOnce ) ;
62+ assert ( ( fs . createReadStream as SinonSpy ) . calledOnce ) ;
6363 await watchHandler ( ) ;
64- assert ( ( fs . readFile as SinonSpy ) . calledTwice ) ;
64+ assert ( ( fs . createReadStream as SinonSpy ) . calledTwice ) ;
6565 } ) ;
6666
6767 it ( 'should work with auto updates and call specified hook' , async ( ) => {
0 commit comments