Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in date where we accidentally called which should have been
- Loading branch information
1 parent
e888d6b
commit be8d35f
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
be8d35f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What?! No unit test? ;o)
be8d35f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh shame on me!
I actually tried to find a way to do it but couldn't find one without breaking compatibility.
This is an odd case due to the fact that I am globally instantiating an object named "chance." So it actually passed my tests fine because PhantomJS (which I use for the tests) had access to the chance object. It is an edge case that will fail only when using this in Node and not anywhere else.
I considered creating another separate test suite spinning up Chance in Node rather than PhantomJS but that seemed unnecessarily complex.
Anyway, I know you were likely just joking with your comment, but I wanted to let you know I did think long and hard about it!