Client Mock Tips
Learn some quick tips to handle the nuances of client-side code in the Jest test environment.
The dimensions of client mocking
There are several high-level elements to keep in mind when mocking inside of our clients. To start, clients run in the browser, and the Jest test environment does not. Since one use for mocking is stubbing out functionality that we cannot or do not want to run in our test environment, we want to keep this in mind.
Additionally, clients typically rely on external services for
So, we have two main focal points here: the fact that our clients are built to run in a browser and that they rely on external data in order to function properly. We are going to ...