title: How to spy on a class constructor jest?
body: <pre><code>export class Foo {
      public static bar() {
          doSomething();
      }
  
      constructor(paramA, paramB) {
  
      } 
  }
  </code></pre>
  
  <p>For a method in a class, we can use
  <code>jest.spyOn(Foo, 'bar')</code> to spy on the method. How about constructor? How do we spy how the object is instantiated? </p>