How to test class constructor in Jest
问题 Let's say I have a class like following: class SomeClass { constructor(a, b) { this.a = a; this.b = b; } } How can I test through Jest that constructor was initialized the right way? Say... this.a = a and this.b = b and not vice versa? I know that I can execute toBeCalledWith but that won't let me check the constructor's logic. I was also thinking about making mockImplementation but in this case it seems pointless as I will rewrite the logic, or I may not be aware of all the nuances of