Skip to content

Instantly share code, notes, and snippets.

View RRMoelker's full-sized avatar

Ruurd Moelker RRMoelker

View GitHub Profile
@TimothyRHuertas
TimothyRHuertas / Abstract.md
Last active June 8, 2021 19:51
Mocking React components with Sinon and QUnit.

React makes compositing components easy. However testing them can get ugly if you are not careful. Consider this example:

var ChildA = React.createClass({
    displayName: "ChildA",
    render: function(){
        return (<div>A in the house</div>);
    }
});