|
|
|
@ -324,6 +324,15 @@ describe('Hash methods', () => {
|
|
|
|
|
assert.strictEqual(Number(objects[1].age), 3);
|
|
|
|
|
assert.strictEqual(!!objects[2], false);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('should return objects if fields is not an array', async () => {
|
|
|
|
|
const objects = await db.getObjectsFields(['testObject8', 'testObject9', 'doesnotexist'], undefined);
|
|
|
|
|
assert.strictEqual(objects[0].name, 'baris');
|
|
|
|
|
assert.strictEqual(Number(objects[0].age), 99);
|
|
|
|
|
assert.strictEqual(objects[1].name, 'ginger');
|
|
|
|
|
assert.strictEqual(Number(objects[1].age), 3);
|
|
|
|
|
assert.strictEqual(!!objects[2], false);
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
describe('getObjectKeys()', () => {
|
|
|
|
|