Isolate your Components in Tests: How to Mock your Dependencies
webdeveloperdiary.substack.com
Hi Friends. We previously mentioned that unit tests act as basic checks for our app’s components. We also looked at how to write tests where we passed values into a calculation and compared the outputs with expected results. In these tests, we fed our sample inputs directly into a method that took a number, squared it, and then returned the result. No additional components were needed in the process.
Isolate your Components in Tests: How to Mock your Dependencies
Isolate your Components in Tests: How to Mock…
Isolate your Components in Tests: How to Mock your Dependencies
Hi Friends. We previously mentioned that unit tests act as basic checks for our app’s components. We also looked at how to write tests where we passed values into a calculation and compared the outputs with expected results. In these tests, we fed our sample inputs directly into a method that took a number, squared it, and then returned the result. No additional components were needed in the process.