John Pizzo

Results 5 comments of John Pizzo

I went with karma mocha chai and stubbed the methods manually

``` const TestUtils = require('react/lib/ReactTestUtils'); const React = require('react'); const ReactMethodStub = { _context: this, _spyOn: function (componentClass, method) { const classFunction = componentClass.prototype[method]; delete componentClass.prototype[method] componentClass.prototype[method] = sinon.spy(function ()...

I basically go through the methods on the component and replace all the methods specified with Sinon spy wrapped function. I then render the component using TestUtils and send it...