Merge pull request #6020 from marcjansen/ol.obj-tests

Test that ol.obj.assign throws on undefined/null
This commit is contained in:
Marc Jansen
2016-10-24 14:14:42 +02:00
committed by GitHub

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