Test mocks are too difficult to maintain
We rely too heavily on mocks for our UI unit tests, which creates significant challenges when writing new tests and can lead to flakiness.
EFSA should place less emphasis on mocking each individual function that interfaces with an API and instead focus more on using Mock Service Worker (MSW). Rather than mocking functions, we should mock endpoints and the data they return. Mocking functions introduce unnecessary complexity for our use cases.
The way we mock endpoints in the membership portal should be an example of good mocking.
Edited by Olivier Goulet