Open levibostian opened 4 years ago
Here is a project that seems to do this: https://github.com/marchaos/jest-mock-extended
However, it has had a history of not being maintained and for some reason, it overrides the jest mock matcher API with Jasmine's. I am thinking of forking it and editing parts of it to be smaller and use the original jest matcher api.
See this issue for discussion around this.
At this time, I am generating mocks manually in my code. The follow a very simple process:
The problem is maintaining them. They are simply annoying to write which gets me to be lazy and not want to write them.
If there was a way to generate them automatically, that would be great. How do we do that?
DecoratorsWill not work because it does not work on interfaces and it only passes the constructor of class when used on a class. No way to traverse an interface.FYI: handy ast viewer