Help me understand the state of TS mocking ecosystem
I’m a relatively new typescript developer (new to JS actually). I come from a Java background.
I wanted to write some unit tests, but for the life of me I can’t find a universally popular Typescript mocking library that’s still maintained?
According to SO, JS mocking libraries like Sinon or Jest do not have full typed capabilities.
Of the fully typed mocking libraries, people recommend typemoc or ts-mockito but the former hasn’t been maintained since 2017, and the latter not since June 2020.
I see a relatively new one called @fluffy-spoon/substitue which looks maintained but not that popular at the moment. I’m also not sure if it works on TS4 (will play around with it)
I guess my question is: given the lack of activity around this, are people just not mocking code these days? Or are we just sacrificing type safety using jest or sinon?