Because some of our web components require an OS API key as a property, it means that our unit test references the existing environment variable and would fail with an invalid key.
In order to avoid making live requests during testing and making the tests more resiliant for users without an API key, we should add mocks of the expected responses (at least for OS Places API, we'll still have to think about how we deal with OS Vector Tiles etc).
https://vitest.dev/guide/mocking.html
See #139 (comment)
Because some of our web components require an OS API key as a property, it means that our unit test references the existing environment variable and would fail with an invalid key.
In order to avoid making live requests during testing and making the tests more resiliant for users without an API key, we should add mocks of the expected responses (at least for OS Places API, we'll still have to think about how we deal with OS Vector Tiles etc).
https://vitest.dev/guide/mocking.html
See #139 (comment)