jackdbernier/mockery — pull request #1 by jackdbernier (2014-04-25 00:13:55+00:00)
Title: Resolve path to module

Before this commit you had to `registerMock('./my_module.js', ...`
if module under test contained `require('./my_module.js')`,
no matter where in filesystem the file with `registerMock`
was located. The result of this approach was that when `my_module.js`
was required during the test from different files with
different relative path, you had to `registerMock` for
all of these different relative paths.

After this commit the path to module is resolved the
same way as when `required` is called, i.e. you have to supply
path relative to the current file where `(de)registerMock`
(or (de)registerSubstitute, or (de)registerAllowable) is used.