@@ -106,11 +106,11 @@ describe('utils.checkForUpdates', () => {
106106
107107 describe ( 'Already on latest' , ( ) => {
108108 it ( 'Does not warn the console' , async ( ) => {
109- const package = require ( '../package.json' ) ;
110- sinon . replace ( package , 'version' , 'v1.0.0' ) ;
109+ const pkg = require ( '../package.json' ) ;
110+ sinon . replace ( pkg , 'version' , 'v1.0.0' ) ;
111111 const scope = nock ( 'https://api.github.com' )
112112 . get ( '/repos/fent/node-ytdl-core/releases/latest' )
113- . reply ( 200 , { tag_name : `v${ package . version } ` } ) ;
113+ . reply ( 200 , { tag_name : `v${ pkg . version } ` } ) ;
114114 const warnSpy = sinon . spy ( ) ;
115115 sinon . replace ( console , 'warn' , warnSpy ) ;
116116 sinon . replace ( Date , 'now' , sinon . stub ( ) . returns ( Infinity ) ) ;
@@ -122,8 +122,8 @@ describe('utils.checkForUpdates', () => {
122122
123123 describe ( 'When there is a new update' , ( ) => {
124124 it ( 'Warns the console about the update' , async ( ) => {
125- const package = require ( '../package.json' ) ;
126- sinon . replace ( package , 'version' , 'v1.0.0' ) ;
125+ const pkg = require ( '../package.json' ) ;
126+ sinon . replace ( pkg , 'version' , 'v1.0.0' ) ;
127127 const scope = nock ( 'https://api.github.com' )
128128 . get ( '/repos/fent/node-ytdl-core/releases/latest' )
129129 . reply ( 200 , { tag_name : 'vInfinity.0.0' } ) ;
0 commit comments