@@ -464,7 +464,7 @@ describe('ChildProcessTracker', function () {
464464 memoryBytes : 0 ,
465465 }
466466
467- usageMock . resolves ( highCpu )
467+ usageMock . returns ( highCpu )
468468
469469 await clock . tickAsync ( ChildProcessTracker . pollingInterval )
470470 assertLogsContain ( 'exceeded cpu threshold' , false , 'warn' )
@@ -483,7 +483,7 @@ describe('ChildProcessTracker', function () {
483483 memoryBytes : ChildProcessTracker . thresholds . memoryBytes + 1 ,
484484 }
485485
486- usageMock . resolves ( highMemory )
486+ usageMock . returns ( highMemory )
487487 await clock . tickAsync ( ChildProcessTracker . pollingInterval )
488488 assertLogsContain ( 'exceeded memory threshold' , false , 'warn' )
489489 assertTelemetry ( 'ide_childProcessWarning' , {
@@ -497,9 +497,9 @@ describe('ChildProcessTracker', function () {
497497 it ( 'includes pid in logs' , async function ( ) {
498498 const runningProcess = startSleepProcess ( )
499499
500- usageMock . resolves ( {
501- cpu : ChildProcessTracker . thresholds . cpuPercent + 1 ,
502- memory : 0 ,
500+ usageMock . returns ( {
501+ cpuPercent : 0 ,
502+ memoryBytes : ChildProcessTracker . thresholds . memoryBytes + 1 ,
503503 } )
504504
505505 await clock . tickAsync ( ChildProcessTracker . pollingInterval )
@@ -511,7 +511,7 @@ describe('ChildProcessTracker', function () {
511511 it ( 'does not log for processes within threshold' , async function ( ) {
512512 const runningProcess = startSleepProcess ( )
513513
514- usageMock . resolves ( {
514+ usageMock . returns ( {
515515 cpu : ChildProcessTracker . thresholds . cpuPercent - 1 ,
516516 memory : ChildProcessTracker . thresholds . memoryBytes - 1 ,
517517 } )
0 commit comments