So I've created a function which accepts an ID, internally queries a database via a repository from the data returned mutations are made to the data depending on different scenarios and then we return the data.
How would I unit test this function? Would I stub the find method on my repository layer to return data so I'm not dependant on connecting on the database?
Aucun commentaire:
Enregistrer un commentaire