3 ms·
> you can't generally mock a function Yes, this is generally true, so the workaround is to put your function in a class, and use an interface + dependency inje
by yonaguska 4y ago
> you can't generally mock a function
Yes, this is generally true, so the workaround is to put your function in a class, and use an interface + dependency injection to mock what you need. Sometimes it's a hassle.