From 732a64b6cf9b3e9e36eee19be0c385ce5e7b2457 Mon Sep 17 00:00:00 2001 From: Tglman Date: Thu, 12 Oct 2023 15:16:13 +0100 Subject: [PATCH] fix: additional test fixes --- lib/transport/rest/protocol/deserializer.js | 3 ++- test/db/query-test.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/transport/rest/protocol/deserializer.js b/lib/transport/rest/protocol/deserializer.js index 34594f63..ff1a88d5 100644 --- a/lib/transport/rest/protocol/deserializer.js +++ b/lib/transport/rest/protocol/deserializer.js @@ -38,7 +38,8 @@ function deserializeDocument (serialized) { return res; } catch (e) { - throw new errors.Request(serialized + " error:" + e); + throw e; + //throw new errors.Request(serialized + " error:" + JSON.stringify(e)); } } diff --git a/test/db/query-test.js b/test/db/query-test.js index 20485148..464b3dd9 100644 --- a/test/db/query-test.js +++ b/test/db/query-test.js @@ -264,7 +264,7 @@ describe("Database API - Query", function () { }); }); it('should select a record by its RID', function () { - return this.db.select().from('OUser').where({'@rid': new LIB.RID('#5:0')}).one() + return this.db.select().from('OUser').where({'@rid': new LIB.RID('#6:0')}).one() .then(function (user) { expect(typeof user).to.equal('object'); user.name.should.equal('admin'); @@ -388,7 +388,7 @@ describe("Database API - Query", function () { name: 'reader', password: 'mynewerpassword', status: 'active', - roles: ["#4:1"], + roles: ["#5:1"], foo: 'bar'}; return this.db.update('OUser').content(updatedUser).where({name: 'reader'}).limit(1).scalar() .then(function (count) {