fix: isObjectField(s) empty field

This commit is contained in:
Barış Soner Uşaklı
2021-05-06 12:44:01 -04:00
parent ff98f85488
commit 2c22b06feb
2 changed files with 13 additions and 1 deletions

View File

@@ -406,6 +406,11 @@ describe('Hash methods', () => {
done();
});
});
it('should not error if field is falsy', async () => {
const value = await db.isObjectField('hashTestObjectEmpty', '');
assert.strictEqual(value, false);
});
});
@@ -427,6 +432,11 @@ describe('Hash methods', () => {
done();
});
});
it('should not error if one field is falsy', async () => {
const values = await db.isObjectFields('hashTestObject', ['name', '']);
assert.deepStrictEqual(values, [true, false]);
});
});
describe('deleteObjectField()', () => {