{"action":"created","issue":{"url":"https://api.github.com/repos/colonyamerican/mock-knex/issues/33","repository_url":"https://api.github.com/repos/colonyamerican/mock-knex","labels_url":"https://api.github.com/repos/colonyamerican/mock-knex/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/colonyamerican/mock-knex/issues/33/comments","events_url":"https://api.github.com/repos/colonyamerican/mock-knex/issues/33/events","html_url":"https://github.com/colonyamerican/mock-knex/pull/33","id":170009708,"number":33,"title":"Fix unmocking functionality on knex 0.10.0","user":{"login":"maxArturo","id":5713763,"avatar_url":"https://avatars.githubusercontent.com/u/5713763?v=3","gravatar_id":"","url":"https://api.github.com/users/maxArturo","html_url":"https://github.com/maxArturo","followers_url":"https://api.github.com/users/maxArturo/followers","following_url":"https://api.github.com/users/maxArturo/following{/other_user}","gists_url":"https://api.github.com/users/maxArturo/gists{/gist_id}","starred_url":"https://api.github.com/users/maxArturo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxArturo/subscriptions","organizations_url":"https://api.github.com/users/maxArturo/orgs","repos_url":"https://api.github.com/users/maxArturo/repos","events_url":"https://api.github.com/users/maxArturo/events{/privacy}","received_events_url":"https://api.github.com/users/maxArturo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-08-08T19:53:26Z","updated_at":"2016-08-10T19:56:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/colonyamerican/mock-knex/pulls/33","html_url":"https://github.com/colonyamerican/mock-knex/pull/33","diff_url":"https://github.com/colonyamerican/mock-knex/pull/33.diff","patch_url":"https://github.com/colonyamerican/mock-knex/pull/33.patch"},"body":"The code as-is doesn't unmock because it is still using the old object's references. Here's my humble fix, via mocking the `knex` properties on the objects and making a prop-by-prop copy where needed. This is not the prettiest mocking code but it gets the job done. PR also removes the `leak` warnings on tests for knex 0.10."},"comment":{"url":"https://api.github.com/repos/colonyamerican/mock-knex/issues/comments/238984707","html_url":"https://github.com/colonyamerican/mock-knex/pull/33#issuecomment-238984707","issue_url":"https://api.github.com/repos/colonyamerican/mock-knex/issues/33","id":238984707,"user":{"login":"jbrumwell","id":413363,"avatar_url":"https://avatars.githubusercontent.com/u/413363?v=3","gravatar_id":"","url":"https://api.github.com/users/jbrumwell","html_url":"https://github.com/jbrumwell","followers_url":"https://api.github.com/users/jbrumwell/followers","following_url":"https://api.github.com/users/jbrumwell/following{/other_user}","gists_url":"https://api.github.com/users/jbrumwell/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrumwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrumwell/subscriptions","organizations_url":"https://api.github.com/users/jbrumwell/orgs","repos_url":"https://api.github.com/users/jbrumwell/repos","events_url":"https://api.github.com/users/jbrumwell/events{/privacy}","received_events_url":"https://api.github.com/users/jbrumwell/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T19:56:13Z","updated_at":"2016-08-10T19:56:13Z","body":"@maxArturo 0.11 was because if you give an object `constructor` as a property name it is converted to a function. This was causing my spec's to fail on the replacement side. I have got all tests passing throughout the suite now.  If you have time to test with your setup that would be great, currently located under branch `release/0.3.3`"}}
{"actor":{"display_login":"jbrumwell"}}