Skip to content
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

Merged
merged 3 commits into from
Jul 16, 2017

Conversation

benjamingr
Copy link
Member

Error on incorrect install use of lolex 2.

Fixes #108

Copy link
Contributor

@fatso83 fatso83 left a 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?

@benjamingr
Copy link
Member Author

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).

@fatso83
Copy link
Contributor

fatso83 commented Jul 14, 2017

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 () {
Copy link
Contributor

@fatso83 fatso83 Jul 14, 2017

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

@benjamingr
Copy link
Member Author

Updated, please take a look.

Also - any chance you could do a release today with the bugfix PR?

@fatso83
Copy link
Contributor

fatso83 commented Jul 16, 2017 via email

@benjamingr
Copy link
Member Author

benjamingr commented Jul 16, 2017

sorry, not a chance. cell phone only in the mountains.

No problem - enjoy the mountains :)

what bugfix pr are you talking about? this one?

The process.hrtime not progressing one.


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 :)

@fatso83 fatso83 self-assigned this Jul 16, 2017
@fatso83 fatso83 merged commit 8e89bb8 into sinonjs:master Jul 16, 2017
@fatso83
Copy link
Contributor

fatso83 commented Jul 16, 2017

Thanks!

@benjamingr
Copy link
Member Author

@fatso83 do you have an estimated ETA on when 2.0.1 can happen?

@benjamingr benjamingr deleted the error-on-incorrect-install-use branch July 18, 2017 08:30
@fatso83
Copy link
Contributor

fatso83 commented Jul 18, 2017

2.1.0 is out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants