i-like-robots / rewireify

Rewireify is a port of Rewire for Browserify that adds setter and getter methods to each module so that their behaviour can be modified for better unit testing.
https://www.npmjs.com/package/rewireify
Other
59 stars 10 forks source link

fixes error thrown with phantom and React 0.14 #20

Closed rjmk closed 8 years ago

rjmk commented 8 years ago

When running my tape test suite through phantom with React 0.14 I get a type error 'Object.extensible can only be called on Objects" This commit checks that module.exports is not a primitive before calling Object.extensible on it.

rjmk commented 8 years ago

Hi @i-like-robots. I was just checking if there was something specific that you didn't like about this PR? I'm happy to make changes

Sorry if it's just that you haven't had time to review it! I'm not trying to be pushy

i-like-robots commented 8 years ago

Sorry for the slow response and thanks for taking the time for making the PR, @rjmk - I didn't see it first time around.

rjmk commented 8 years ago

Not at all! Cheers for getting back to me

i-like-robots commented 8 years ago

Thanks @rjmk ! Will bump a release now.

rjmk commented 8 years ago

:+1: