Open
Description
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:
const user1 = yield User.get("123").run();
const user2 = yield User.get("123").run();
user1.must.eql(user2);
it explodes and complains about JSON serialization issues
ReqlDriverError: `toJSON` takes 0 argument, 1 provided after:
r.table("User")
at Term._arity (node_modules/rethinkdbdash/lib/term.js:3014:11)
at Term.toJsonString (node_modules/rethinkdbdash/lib/term.js:2765:10)
at Query.(anonymous function) [as toJSON] (node_modules/thinky/lib/query.js:814:60)
at Model.(anonymous function) [as toJSON] (node_modules/thinky/lib/model.js:722:32)
at Object.stringify (native)
at exports.stringify (node_modules/must/lib/index.js:38:19)
at Must.assert (node_modules/must/must.js:1151:13)
at Must.eql (node_modules/must/must.js:544:8)
at Context.<anonymous> (test/models/user_test.js:53:19)
at next (native)
at onFulfilled (node_modules/co/index.js:65:19)
Metadata
Metadata
Assignees
Labels
No labels