@@ -208,7 +208,7 @@ test("downloads and caches explicitly requested bundles that aren't in the toolc
208208 t . assert ( toolcache . find ( "CodeQL" , `0.0.0-${ version } ` ) ) ;
209209 t . is ( result . toolsVersion , `0.0.0-${ version } ` ) ;
210210 t . is ( result . toolsSource , ToolsSource . Download ) ;
211- t . is ( typeof result . toolsDownloadDurationMs , "number" ) ;
211+ t . assert ( Number . isInteger ( result . toolsDownloadDurationMs ) ) ;
212212 }
213213
214214 t . is ( toolcache . findAllVersions ( "CodeQL" ) . length , 2 ) ;
@@ -241,7 +241,7 @@ test("downloads an explicitly requested bundle even if a different version is ca
241241 t . assert ( toolcache . find ( "CodeQL" , "0.0.0-20200610" ) ) ;
242242 t . deepEqual ( result . toolsVersion , "0.0.0-20200610" ) ;
243243 t . is ( result . toolsSource , ToolsSource . Download ) ;
244- t . not ( result . toolsDownloadDurationMs , undefined ) ;
244+ t . assert ( Number . isInteger ( result . toolsDownloadDurationMs ) ) ;
245245 } ) ;
246246} ) ;
247247
@@ -293,7 +293,7 @@ for (const {
293293 t . assert ( toolcache . find ( "CodeQL" , expectedToolcacheVersion ) ) ;
294294 t . deepEqual ( result . toolsVersion , cliVersion ) ;
295295 t . is ( result . toolsSource , ToolsSource . Download ) ;
296- t . not ( result . toolsDownloadDurationMs , undefined ) ;
296+ t . assert ( Number . isInteger ( result . toolsDownloadDurationMs ) ) ;
297297 } ) ;
298298 } ) ;
299299}
@@ -428,7 +428,7 @@ for (const variant of [util.GitHubVariant.GHAE, util.GitHubVariant.GHES]) {
428428 ) ;
429429 t . deepEqual ( result . toolsVersion , defaults . cliVersion ) ;
430430 t . is ( result . toolsSource , ToolsSource . Download ) ;
431- t . is ( typeof result . toolsDownloadDurationMs , "number" ) ;
431+ t . assert ( Number . isInteger ( result . toolsDownloadDurationMs ) ) ;
432432
433433 const cachedVersions = toolcache . findAllVersions ( "CodeQL" ) ;
434434 t . is ( cachedVersions . length , 2 ) ;
@@ -461,7 +461,7 @@ test('downloads bundle if "latest" tools specified but not cached', async (t) =>
461461 ) ;
462462 t . deepEqual ( result . toolsVersion , defaults . cliVersion ) ;
463463 t . is ( result . toolsSource , ToolsSource . Download ) ;
464- t . is ( typeof result . toolsDownloadDurationMs , "number" ) ;
464+ t . assert ( Number . isInteger ( result . toolsDownloadDurationMs ) ) ;
465465
466466 const cachedVersions = toolcache . findAllVersions ( "CodeQL" ) ;
467467 t . is ( cachedVersions . length , 2 ) ;
@@ -527,7 +527,7 @@ test("download codeql bundle from github ae endpoint", async (t) => {
527527 ) ;
528528
529529 t . is ( result . toolsSource , ToolsSource . Download ) ;
530- t . is ( typeof result . toolsDownloadDurationMs , "number" ) ;
530+ t . assert ( Number . isInteger ( result . toolsDownloadDurationMs ) ) ;
531531
532532 const cachedVersions = toolcache . findAllVersions ( "CodeQL" ) ;
533533 t . is ( cachedVersions . length , 1 ) ;
0 commit comments