Skip to content

Equality assertions are broken on objects from... different places? #677

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

Closed
cryptoquick opened this issue Mar 23, 2016 · 5 comments
Closed

Comments

@cryptoquick
Copy link

Description

I'm guessing it's due to the work that's been going on related to #640 because I have an object literal that comes from one place, then I assert it is the same as an object that's defined in the test with .same / .is assertions. I'm being told of an assertion error. However, if I stringify my objects and then compare them, there's no difference.

Environment

ava 0.13.0
Node.js v5.6.0
darwin 15.3.0
@sindresorhus
Copy link
Member

Yes, this is fixed in master. We'll do a release soon. For now you can do $ npm i -D sindresorhus/ava#f2c0709 to get latest master.

@cryptoquick
Copy link
Author

Strange... I ran your command, and received:
Error: ENOENT: no such file or directory, open '/Users/hunter/GitHub/SlackPass/node_modules/.cache/ava/53092e4a64bb20eef9a4d3d19e78ec18.js.map'
I subsequently nuked the node_modules folder, had npm pour me another, and tried my tests again... No dice.

Assertion Error

Same result from .is and .same... I tried.

@cryptoquick
Copy link
Author

Also, before I nuked my node_modules, I ran your command with --save-dev. It's in my package.json as:
"devDependencies": { "ava": "github:sindresorhus/ava#f2c0709", ...

@cryptoquick
Copy link
Author

Oh, that's weird... country:null

@cryptoquick
Copy link
Author

Bam! We're good on this one, bud. 👍

Awesome!

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

2 participants