diff --git a/test/spec/ol/objectutil.test.js b/test/spec/ol/objectutil.test.js index 7b5204021b..0c29f620fd 100644 --- a/test/spec/ol/objectutil.test.js +++ b/test/spec/ol/objectutil.test.js @@ -31,6 +31,18 @@ describe('ol.obj.assign()', function() { }); + it('throws a TypeError with `undefined` as target', function() { + expect(ol.obj.assign).withArgs(undefined).to.throwException(function(e) { + expect(e).to.be.a(TypeError); + }); + }); + + it('throws a TypeError with `null` as target', function() { + expect(ol.obj.assign).withArgs(null).to.throwException(function(e) { + expect(e).to.be.a(TypeError); + }); + }); + }); describe('ol.obj.clear()', function() {