react-component-tester
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "react-component-tester", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "A simple helper to make testing react components with shallow rendering easier", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -150,7 +150,7 @@ const stampit = require('stampit'); | ||
const ignore = ['constructor', 'componentWillUnmount', 'render']; | ||
for (const key of Object.getOwnPropertyNames(Component.prototype)) { | ||
if (!~ignore.indexOf(key)) { | ||
sinon.spy(Component.prototype, key); | ||
Object.getOwnPropertyNames(Component.prototype).forEach(method => { | ||
if (!~ignore.indexOf(method)) { | ||
sinon.spy(Component.prototype, method); | ||
} | ||
} | ||
}); | ||
this.ComponentToUse = Component; | ||
@@ -157,0 +157,0 @@ return this; |
42481