@@ -464,7 +464,7 @@ describe('ChildProcessTracker', function () {
464
464
memoryBytes : 0 ,
465
465
}
466
466
467
- usageMock . resolves ( highCpu )
467
+ usageMock . returns ( highCpu )
468
468
469
469
await clock . tickAsync ( ChildProcessTracker . pollingInterval )
470
470
assertLogsContain ( 'exceeded cpu threshold' , false , 'warn' )
@@ -483,7 +483,7 @@ describe('ChildProcessTracker', function () {
483
483
memoryBytes : ChildProcessTracker . thresholds . memoryBytes + 1 ,
484
484
}
485
485
486
- usageMock . resolves ( highMemory )
486
+ usageMock . returns ( highMemory )
487
487
await clock . tickAsync ( ChildProcessTracker . pollingInterval )
488
488
assertLogsContain ( 'exceeded memory threshold' , false , 'warn' )
489
489
assertTelemetry ( 'ide_childProcessWarning' , {
@@ -497,9 +497,9 @@ describe('ChildProcessTracker', function () {
497
497
it ( 'includes pid in logs' , async function ( ) {
498
498
const runningProcess = startSleepProcess ( )
499
499
500
- usageMock . resolves ( {
501
- cpu : ChildProcessTracker . thresholds . cpuPercent + 1 ,
502
- memory : 0 ,
500
+ usageMock . returns ( {
501
+ cpuPercent : 0 ,
502
+ memoryBytes : ChildProcessTracker . thresholds . memoryBytes + 1 ,
503
503
} )
504
504
505
505
await clock . tickAsync ( ChildProcessTracker . pollingInterval )
@@ -511,7 +511,7 @@ describe('ChildProcessTracker', function () {
511
511
it ( 'does not log for processes within threshold' , async function ( ) {
512
512
const runningProcess = startSleepProcess ( )
513
513
514
- usageMock . resolves ( {
514
+ usageMock . returns ( {
515
515
cpu : ChildProcessTracker . thresholds . cpuPercent - 1 ,
516
516
memory : ChildProcessTracker . thresholds . memoryBytes - 1 ,
517
517
} )
0 commit comments