Skip to content

Commit 400a3de

Browse files
committed
Refactor environment test setup to clear all environment variables before each test, ensuring isolation. Update test cases to include new CSV paths for CPU utilization data.
1 parent ea858fd commit 400a3de

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/config/environment.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ describe('Environment Configuration', () => {
66

77
beforeEach(() => {
88
jest.resetModules();
9-
process.env = { ...originalEnv };
9+
// Clear all environment variables and only keep the ones we explicitly set
10+
process.env = {};
1011
});
1112

1213
afterAll(() => {
@@ -31,6 +32,8 @@ describe('Environment Configuration', () => {
3132
retryAttempts: 3,
3233
retryDelay: 1000,
3334
},
35+
cpuUtilizationCsvPath: 'data-examples/server-utilization.csv',
36+
utilizationCsvPath: 'data-examples/server-utilization.csv',
3437
});
3538
});
3639

@@ -51,6 +54,8 @@ describe('Environment Configuration', () => {
5154
retryAttempts: 3,
5255
retryDelay: 1000,
5356
},
57+
cpuUtilizationCsvPath: 'data-examples/server-utilization.csv',
58+
utilizationCsvPath: 'data-examples/server-utilization.csv',
5459
});
5560
});
5661

0 commit comments

Comments
 (0)