var spy = sinon.spy(window, 'MyApp');
// Test if MyApp is instantiated

assert.isTrue(spy.calledWithNew());
// Get the instance

console.log(spy.getCall(0).returnValue);

Comments

comments powered by Disqus