-
Notifications
You must be signed in to change notification settings - Fork 1
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
instanceOf() #8
Comments
I honestly never use We might pass on this unless there's strong opinions otherwise as we're trying to keep this module small and focused. Can always use heavier assertion libs if you need something like this. Keeping it open for discussion though. |
Yeah, me neighter. I practically never use it. |
👍 Only place i use it is |
async.each([1, 2, 3], function (cb) {
claim.instanceOf(cb, Function); // make sure async is correctly passing me a function callback
}); Obviously I'm not writing tests for |
why not? async.each([1, 2, 3], function (cb) {
claim.is(cb instanceof Function, true); // make sure async is correctly passing me a function callback
}); |
For the same reason claim.is(1, 1); instead of claim.true(1 === 1) |
You shouldn't use |
@sindresorhus I understand, though in Node in particular that isn't a problem. If I need to check claim.instanceOf(obj, SomeFunction); // obj.constructor.name === SomeFunction.name Using |
Seeing as this is IMHO and obscure case, I'd prefer we go with claim.ok(obj instanceOf SomeFunction); |
Agreed with that. |
Need
instanceOf()
!The text was updated successfully, but these errors were encountered: