Test that ol.obj.assign throws on undefined/null

This commit is contained in:
Marc Jansen
2016-10-24 10:39:48 +02:00
parent 908f254bd2
commit f973eaa24d

View File

@@ -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() {