]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
test(ui): add tests for converters, websocket utils, and useFetchData
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Apr 2026 01:08:51 +0000 (03:08 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Apr 2026 01:08:51 +0000 (03:08 +0200)
commitdf99c2e939c3584a1045d9751262fd289896948c
tree549aa36e8227869f63ab98740115ffaf472cc61c
parent51aa070b3044074a394a9b7123a64dc22c2489b4
test(ui): add tests for converters, websocket utils, and useFetchData

- Add converters.test.ts in ui-common (26 tests for convertToBoolean/convertToInt)
- Add websocket.test.ts in ui-common (6 tests for getWebSocketStateName)
- Add useFetchData tests in ui-web (5 tests: success, error, loading guard, reset, no-callback)
- Guard onError callback in useFetchData with try/catch for robustness
ui/common/tests/converters.test.ts [new file with mode: 0644]
ui/common/tests/websocket.test.ts [new file with mode: 0644]
ui/web/src/composables/Utils.ts
ui/web/tests/unit/Utils.test.ts