Hi all! I'm new to the concept of unit testing on web development.
I have loaders/actions defined all throughout my web app that call 3rd party APIs. What is the best practice to unit test these kind of loaders? Would I re-create them as mock resource routes and swap the calls out for mock API's instead? Or add parameters to go down a different path in the code execution to mock the API data rather than make a fetch call.
Any help would be appreciated, thank you!