Skip to content

Commit

Permalink
test: Test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-shivamsingh committed Jan 26, 2025
1 parent 7405009 commit b9524e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/monitoring/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import { promises as fs } from 'fs';

describe('Monitoring', () => {
let monitoring, mockExecuteMonitoring;
let platform = 'test_platform';

beforeEach(async () => {
spyOn(os, 'platform').and.returnValue(platform);
monitoring = new Monitoring();
logger.loglevel('debug');
process.env.PERCY_LOGLEVEL = 'debug';
Expand Down Expand Up @@ -83,7 +85,7 @@ describe('Monitoring', () => {
it('logs os, cpu, memory info', async () => {
await monitoring.logSystemInfo();
expect(logger.stderr).toEqual(jasmine.arrayContaining([
'[percy:monitoring] [Operating System] Platform: darwin, Type: test_type, Release: test_release',
'[percy:monitoring] [Operating System] Platform: test_platform, Type: test_type, Release: test_release',
'[percy:monitoring] [CPU] Arch: test_arch, cores: 3',
'[percy:monitoring] [Memory] Total: 9.633920457214117 gb, Swap Space: 228.49388815835118 gb',
'[percy:monitoring] Container Level: false, Pod Level: false, Machine Level: true'
Expand Down

0 comments on commit b9524e3

Please sign in to comment.