Test that ol.obj.assign throws on undefined/null
This commit is contained in:
@@ -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() {
|
describe('ol.obj.clear()', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user