view data tests
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { DashboardConsistencyDisplay } from './DashboardConsistencyDisplay';
|
||||
|
||||
describe('DashboardConsistencyDisplay', () => {
|
||||
describe('happy paths', () => {
|
||||
it('should format consistency correctly', () => {
|
||||
expect(DashboardConsistencyDisplay.format(0)).toBe('0%');
|
||||
expect(DashboardConsistencyDisplay.format(50)).toBe('50%');
|
||||
expect(DashboardConsistencyDisplay.format(100)).toBe('100%');
|
||||
});
|
||||
});
|
||||
|
||||
describe('edge cases', () => {
|
||||
it('should handle decimal consistency', () => {
|
||||
expect(DashboardConsistencyDisplay.format(85.5)).toBe('85.5%');
|
||||
expect(DashboardConsistencyDisplay.format(99.9)).toBe('99.9%');
|
||||
});
|
||||
|
||||
it('should handle negative consistency', () => {
|
||||
expect(DashboardConsistencyDisplay.format(-10)).toBe('-10%');
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user