-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error on incorrect install use #112
Conversation
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.
Could you also check the other conditions mentioned: 'config instanceof Date', arguments.length > 1 and Array.isArray?
Sure - can you elaborate a little on what that would look like? (If you just write down the rules you want me to test I'll test them). |
That was the three rules, actually 😄 If any of them are true, then we have a usage error. if ( arguments.length > 1 || config instanceof Date || Array.isArray(config) || typeof config === 'number') {
// throw TypeError
} |
this.clock = lolex.install({}); | ||
}); | ||
|
||
it("throws a TypeError on a number parameter", function () { |
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.
this should be rewritten to use assert.exception
see line 210 for an example
Updated, please take a look. Also - any chance you could do a release today with the bugfix PR? |
sorry, not a chance. cell phone only in the mountains. what bugfix pr are
you talking about? this one? this is not a bug fix as much as an improvement, and
it is hardly pressing :-) i'll look into it tomorrow!
|
No problem - enjoy the mountains :)
The I'd like to make sure I'm not pressuring you into anything - I know from personal experience that collaborators in open source projects are very susceptible to burn: if I'm annoying you with all the timeline questions by all means feel free to blow me off with a concrete further date I can communicate internally (like "Thursday"). Would hate to ruin your 🗻⛰ trip :) |
Thanks! |
@fatso83 do you have an estimated ETA on when 2.0.1 can happen? |
Error on incorrect install use of lolex 2.
Fixes #108