Added unit test cases to cover instrument controller. instrument route, controller and service refactored to allow unit testing.
Added unit test cases to cover instrument controller. instrument route, controller and service refactored to allow unit testing.
- Unit test cases for the instrument controller (available running
npm run unit-test
and automatically while running thetest
step in the pipeline) - Set node_env to test for the test variant (blubber file)
- route, controller and service layers have been refactored for better project organization and to allow unit testing
- Sanitization and validation have been added when getting an instrument (GET /instrument/:slug)
- actionLogger util library (salUtil so far) has been created to refactor and add a kind of abstraction layer to log actions (SAL was implemented but there is an open discussion to replace it with a different mechanism)
- A couple of changes to adapt the frontend to the new responses (same structure for ok and ko responses)
Note: after pushing the last change to this MR, the pipeline is working fine with all these new unit test cases
Bug: T367853