Testing: spyOn new Object in Class Constructor
<p>I have a React component as such:</p>

<pre><code>class Entity extends React.component{
  constructor(props{
  ...
  const foo = new Bar(...);
  }
  ...
}
module.exports = Entity;
</code></pre>

<p>I am now using Jasmine 2.5 to write tests for this module, and I am wondering how to check that the <code>foo</code> object was created. </p>