refactor: centralize lake metrics calculations into a utility module with comprehensive unit tests

This commit is contained in:
David Fencl
2026-06-06 11:45:56 +02:00
parent 6d77c20c84
commit dbb22e7972
4 changed files with 130 additions and 20 deletions
+3 -1
View File
@@ -36,6 +36,8 @@ describe('KpiCards Component', () => {
const noDiffData = { ...mockData, storageDiff: 0, fullness: 85.5 };
render(<KpiCards data={noDiffData} language="cs" />);
expect(screen.getByText('85.5%')).toBeInTheDocument();
const elements = screen.getAllByText('85.5%');
expect(elements.length).toBeGreaterThan(0);
expect(elements[0]).toBeInTheDocument();
});
});