Skip to content

Commit 60dc43e

Browse files
Fixing review comment
1 parent 865086f commit 60dc43e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/resource-monitoring-integration.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ process.on('SIGTERM', () => {
243243
const response = await makeRequest('GET', 'http://localhost:9995/');
244244
expect(response.statusCode).toBe(200);
245245
expect(response.body).toContain('chart.js');
246-
expect(response.body).toContain('canvas id="cpu-chart"');
247-
expect(response.body).toContain('canvas id="memory-chart"');
248-
expect(response.body).toContain('canvas id="network-chart"');
249-
expect(response.body).toContain('canvas id="disk-chart"');
246+
expect(response.body).toMatch(/<canvas[^>]*\bid\s*=\s*["']cpu-chart["'][^>]*>/i);
247+
expect(response.body).toMatch(/<canvas[^>]*\bid\s*=\s*["']memory-chart["'][^>]*>/i);
248+
expect(response.body).toMatch(/<canvas[^>]*\bid\s*=\s*["']network-chart["'][^>]*>/i);
249+
expect(response.body).toMatch(/<canvas[^>]*\bid\s*=\s*["']disk-chart["'][^>]*>/i);
250250
}, 15000);
251251
});
252252

0 commit comments

Comments
 (0)