3 ms·
Thanks for the input! Makes a ton of sense. Services themselves are passed in other services on the constructor. The reason it isn’t done in the APIFunction is
by yasserf 5y ago
Thanks for the input!
Makes a ton of sense. Services themselves are passed in other services on the constructor. The reason it isn’t done in the APIFunction is because of a uniform use / functions are called via a fixed interface.
However I think there’s a decent middle ground with typescript where it can figure out what objects are being used and then only require your tests to mock those. That way you get better typescript safety.
Thank you for the feedback!