mfncooper / mockery

Simplifying the use of mocks with Node.js
Other
1.1k stars 60 forks source link

deal with self-register bug in post-enable require #48

Closed bengl closed 8 years ago

bengl commented 8 years ago

In cases where native addons were first required after mockery was enabled, and then this happened again later, you'd get a 'did not self-register' error. This has been corrected by populating the originalCache with native addons that have been required since mockery was enabled.

Test case courtesy of @petey.

bengl commented 8 years ago

Fails to install buffertools in node4. I'll try a different native addon.

sylvio commented 8 years ago

LGTM