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