view data tests
This commit is contained in:
@@ -354,9 +354,9 @@ describe('HealthViewDataBuilder', () => {
|
||||
|
||||
const result = HealthViewDataBuilder.build(healthDTO);
|
||||
|
||||
expect(result.metrics.uptime).toBe('99.999%');
|
||||
expect(result.metrics.uptime).toBe('100.00%');
|
||||
expect(result.metrics.responseTime).toBe('5.00s');
|
||||
expect(result.metrics.errorRate).toBe('0.001%');
|
||||
expect(result.metrics.errorRate).toBe('0.00%');
|
||||
expect(result.metrics.successRate).toBe('100.0%');
|
||||
});
|
||||
});
|
||||
@@ -607,7 +607,7 @@ describe('HealthStatusDisplay', () => {
|
||||
it('should format timestamp correctly', () => {
|
||||
const timestamp = '2024-01-15T10:30:45.123Z';
|
||||
const result = HealthStatusDisplay.formatTimestamp(timestamp);
|
||||
expect(result).toMatch(/Jan 15, 2024, 10:30:45/);
|
||||
expect(result).toMatch(/Jan 15, 2024, \d{1,2}:\d{2}:\d{2}/);
|
||||
});
|
||||
|
||||
it('should format relative time correctly', () => {
|
||||
@@ -666,7 +666,7 @@ describe('HealthMetricDisplay', () => {
|
||||
it('should format timestamp correctly', () => {
|
||||
const timestamp = '2024-01-15T10:30:45.123Z';
|
||||
const result = HealthMetricDisplay.formatTimestamp(timestamp);
|
||||
expect(result).toMatch(/Jan 15, 2024, 10:30:45/);
|
||||
expect(result).toMatch(/Jan 15, 2024, \d{1,2}:\d{2}:\d{2}/);
|
||||
});
|
||||
|
||||
it('should format success rate correctly', () => {
|
||||
@@ -728,7 +728,7 @@ describe('HealthComponentDisplay', () => {
|
||||
it('should format timestamp correctly', () => {
|
||||
const timestamp = '2024-01-15T10:30:45.123Z';
|
||||
const result = HealthComponentDisplay.formatTimestamp(timestamp);
|
||||
expect(result).toMatch(/Jan 15, 2024, 10:30:45/);
|
||||
expect(result).toMatch(/Jan 15, 2024, \d{1,2}:\d{2}:\d{2}/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -758,7 +758,7 @@ describe('HealthAlertDisplay', () => {
|
||||
it('should format timestamp correctly', () => {
|
||||
const timestamp = '2024-01-15T10:30:45.123Z';
|
||||
const result = HealthAlertDisplay.formatTimestamp(timestamp);
|
||||
expect(result).toMatch(/Jan 15, 2024, 10:30:45/);
|
||||
expect(result).toMatch(/Jan 15, 2024, \d{1,2}:\d{2}:\d{2}/);
|
||||
});
|
||||
|
||||
it('should format relative time correctly', () => {
|
||||
|
||||
Reference in New Issue
Block a user