8000 .eql explodes with thinky · Issue #45 · moll/js-must · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
.eql explodes with thinky #45
Open
@kaievns

Description

@kaievns

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0