-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
.eql explodes with thinky #45
Comments
Hey! Thanks for sharing. Is it me or is this actually Thinky's weird behavior when its |
Sections from the spec to help your argument with them: |
i don't really know who's fault that is, but i can tell you that it works like a charm in both Object.assign({}, user1).must.eql(Object.assign({}, user2)); is a total mood killer, so I thought I'd let you know about the problem |
I wouldn't do the above either. :) It's probably not even guaranteed to return the same properties with it ignoring inherited properties and all. I don't know why Chai and Expect work. I take it they don't call Anywho, I created neumino/thinky#501 for you. |
thanks! :) |
To confirm just in case, the above happens only when the assertion failed and it's printing the model out for the diff, right? |
no, not really. it happens even when two equal records are compared (as show in the first example) i don't think it even gets to the assertion part. it seems that the failure happens when you try to export data for comparison or something like that |
For it to get to the stringifying part of If you print the objects out with console.log(require("util").inspect(user1, {depth: null}))
console.log(require("util").inspect(user2, {depth: null})) Although |
here's what i have when i dump it
those are not ReQL query like @neumino said. those are instances of a |
How did you declare your model? |
@neumino the usual const User = thinky.createModel("User", {
email: String,
passwordSalt: String,
passwordHash: String
}); is there any other way to declare it? |
Hum, can you provide a whole script that triggers this error? |
hey andri, i thought i'd report this one. if i have two instances of a thinky model and then try to compare them against each other with
.eql
like so:it explodes and complains about JSON serialization issues
The text was updated successfully, but these errors were encountered: