diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/helpers.spec.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/helpers.spec.ts b/test/helpers.spec.ts index a34886dd..e436e6dc 100644 --- a/test/helpers.spec.ts +++ b/test/helpers.spec.ts @@ -888,6 +888,11 @@ describe('helpers', () => { expect(Object.keys(testObject)).toContain(actual); }); + + it('should return undefined if given object is empty', () => { + const actual = faker.helpers.objectKey({}); + expect(actual).toBeUndefined(); + }); }); describe('objectValue', () => { @@ -901,6 +906,11 @@ describe('helpers', () => { expect(Object.values(testObject)).toContain(actual); }); + + it('should return undefined if given object is empty', () => { + const actual = faker.helpers.objectValue({}); + expect(actual).toBeUndefined(); + }); }); describe('deprecation warnings', () => { |
