Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Made a fork, would like to merge if possible and/or become a contributor #39

Open
cspotcode opened this issue Dec 13, 2015 · 2 comments

Comments

@cspotcode
Copy link

I forked mockery to cspotcode/mockery-next. (I know, very creative naming!) I liked mockery's API and needed it for some tests at work, but also wanted support for resolving relative paths. I've added that feature and fixed a few other things. It's on npm.

I'd like to merge back into mockery if possible; no sense having extra forks floating around. However, I've made some breaking changes. Any chance for a 2.0 release and/or can I become a contributor to mockery?

Breaking changes

  • Properly resolves relative module paths. Breaking change. Requires all mocked / substituted modules to exist. Otherwise, path resolution fails at registration-time. (Based on @Kubas's PR)

Enhancements

  • Can register null substitutions and mockery will pretend the module doesn't exist. For example: mockery.registerSubstitute('some-optional-module', null);

Bugfixes:

  • Doesn't break when you require('mockery') while useCleanCache is enabled.
  • Substitute modules can have falsey exports.
@naveedn
Copy link

naveedn commented Mar 25, 2016

can we get some movement on this? useCleanCache causes the module to not self-register. This can be fixed with TooTallNate's https://github.com/TooTallNate/node-bindings library.

@novoxd
Copy link

novoxd commented Feb 9, 2017

@cspotcode Thank you so much for youre fork, I had a problem TypeError: self.dialect.Query is not a constructor with sequelize.js when I used mockery.js for any fing. Your fork fixed thaht, I am really happy about this (I spent 6 hours for debugging and founding solution).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants