-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
expect(null).toEqual(jasmine.any(Object)) passes #1255
Comments
I think these lines in /src/core/asymmetric_equality/Any.js:26-28 could be the problem and the following snippet should be enough to fix it AFAICT. if (this.expectedObject == Object) {
return Object.prototype.toString.call(other) == '[object Object]';
} |
I suppose in this context using you wanted to make the PR for this? |
Yeah I'd normally use
I don't mind yeah, I'll try and fit it in today 👍 |
I'm not sure if we can change this behavior for |
version
jasmine v2.5.3
jasmine-core v2.5.2
environment
node v6.9.4
npm v3.10.10
running Jasmine
from cli using the
jasmine
command to run my testsI'm expecting this to fail, but it doesn't.
How does
null
equal an Object?expect(null).toEqual(jasmine.any(Object));
The text was updated successfully, but these errors were encountered: