is-is-odd
is-is-odd copied to clipboard
Fix #4
fix #4
Thanks for the PR! Gave it a quick glimpse and I have so many questions. I'll try to review in the weekend.
Code looks good. I'll write some unit tests just to make sure this doesn't happen in the future
The code looks alright. Can you test it with the new test in #6 ?
I'm a production user of this library and this will break everything.
For example, in the following test --
window.isOdd = require('is-odd');
function monkeyPatch(key, fakedValue) { window[key] = fakedValue }
monkeyPatch('isOdd', false) // don't really call isOdd in tests
it('supports monkeypatching isOdd to false', () => {
expects(isIsOdd(window.isOdd)).toBe(true) // FAILING BEHAVIOR NOW - THANKS FOR NOTHING
})
Please consider how your actions effect others, this patch has ruined most of my week.
@leewardbound I'm a bit confused by this usage. The monkey patched isOdd
is indeed not isOdd
, why should it return true?
Also, why would anyone monkey patch isOdd
? Is there a function or any value of more significance (besides isIsOdd
)?
I fix something sometime ago to resolve the debate
+1
😥
:octocat:
+1
+2
What is the best that you ever played ?
Yes
What is this game @victorbnl ? I never heard about it
Yes
...
Yes
Positive or negative, I only want an answer.
Yes
Yes