Skip to content

Commit 6cd9e91

Browse files
committed
add error handling test for deepAssign
1 parent fdf480c commit 6cd9e91

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
@@ -29,6 +29,14 @@ describe('Generic Utilities', () => {
2929
deepAssign(target, source1, source2)
3030
expect(target).to.deep.equal(goal)
3131
})
32+
33+
it('should throw a type error when not passed an object literal', () => {
34+
try {
35+
deepAssign(null, null)
36+
} catch (error) {
37+
expect(error).to.be.an.instanceof(TypeError)
38+
}
39+
})
3240
})
3341

3442
describe('deepEqual()', () => {

0 commit comments

Comments
 (0)