mock(Knex) is storing the original functions on a replacement object, but when being set lodash is storing it on the real object prototype. This change modifies the replacement storage to put the function on a renamed prototype object much like the constructor.
This allows unmock(Knex) to properly restore all mocked functions.
mock(Knex) is storing the original functions on a replacement object, but when being set lodash is storing it on the real object prototype. This change modifies the replacement storage to put the function on a renamed prototype object much like the constructor.
This allows unmock(Knex) to properly restore all mocked functions.
Fixes #126