You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I discovered with lots and lots of debugging while working on #60, the unit tests for pre.js (test/specs/pre.js) are badly broken.
With the old commit-analyzer API, the commit-analyzer would be called, and could trigger a release, even if no commits were present. For this reason, no body realized that pre.js was not actually stubbing child_process, the commit-analyzer was being called anyway.
Well, with the new API, the commit-analyzer is only called when needed, so the mocking has to work. Unfortunately, it doesn't.
I'm not really sure how the tests should be redone, AFAIK, proxyquire sandboxes the module, so the mock won't trickle down into commit.js. So I decided to open this to discuss it.
As I discovered with lots and lots of debugging while working on #60, the unit tests for pre.js (test/specs/pre.js) are badly broken.
With the old commit-analyzer API, the commit-analyzer would be called, and could trigger a release, even if no commits were present. For this reason, no body realized that pre.js was not actually stubbing
child_process
, the commit-analyzer was being called anyway.Well, with the new API, the commit-analyzer is only called when needed, so the mocking has to work. Unfortunately, it doesn't.
I'm not really sure how the tests should be redone, AFAIK, proxyquire sandboxes the module, so the mock won't trickle down into commit.js. So I decided to open this to discuss it.
cc @boennemann
The text was updated successfully, but these errors were encountered: