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

null == undefined #74

Open
superkhau opened this issue Oct 30, 2013 · 3 comments
Open

null == undefined #74

superkhau opened this issue Oct 30, 2013 · 3 comments

Comments

@superkhau
Copy link

expect(null).to.eql(undefined) fails

@moretti
Copy link

moretti commented Nov 27, 2013

If you look at the source code you can see that eql is using the strict equal operator (===), so this is an expected behavior.

@superkhau
Copy link
Author

That makes no sense. I want loose equality so I'm using .eql instead of be/equal. According to the README:

be / equal: asserts === equality
eql: asserts loose equality that works with objects

Unless I'm reading the README wrong, eql asserts LOOSE equality. Try plain Javascript without expect. null == undefined // true

@EvanHahn
Copy link

#136 had the same question, and I agree with it.

I made a fork called expecting.js which should fix this problem, if you're interested. I realize it's a few years too late, but maybe it'll help!

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

No branches or pull requests

3 participants