Skip to content

Commit 67a342f

Browse files
committed
add error handling test for deepEqual
1 parent 6cd9e91 commit 67a342f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/utils/generic.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ describe('Generic Utilities', () => {
6161
const result = deepEqual(first, second)
6262
expect(result).to.be.false
6363
})
64+
65+
it('should throw a type error when not passed an object literal', () => {
66+
try {
67+
deepEqual(null, null)
68+
} catch (error) {
69+
expect(error).to.be.an.instanceof(TypeError)
70+
}
71+
})
6472
})
6573

6674
describe('isObject()', () => {

0 commit comments

Comments
 (0)