Merge pull request #10051 from tschaub/unchained
Simplify the assertion
This commit is contained in:
@@ -30,15 +30,11 @@ describe('ol.obj.assign()', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('throws a TypeError with `undefined` as target', function() {
|
it('throws a TypeError with `undefined` as target', function() {
|
||||||
expect(assign).withArgs(undefined).to.throwException(function(e) {
|
expect(() => assign()).to.throwException(/Cannot convert undefined or null to object/);
|
||||||
expect(e).to.be.a(TypeError);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('throws a TypeError with `null` as target', function() {
|
it('throws a TypeError with `null` as target', function() {
|
||||||
expect(assign).withArgs(null).to.throwException(function(e) {
|
expect(() => assign(null)).to.throwException(/Cannot convert undefined or null to object/);
|
||||||
expect(e).to.be.a(TypeError);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user