Merge pull request #10051 from tschaub/unchained

Simplify the assertion
This commit is contained in:
Tim Schaub
2019-09-28 08:17:09 +02:00
committed by GitHub

View File

@@ -30,15 +30,11 @@ describe('ol.obj.assign()', function() {
});
it('throws a TypeError with `undefined` as target', function() {
expect(assign).withArgs(undefined).to.throwException(function(e) {
expect(e).to.be.a(TypeError);
});
expect(() => assign()).to.throwException(/Cannot convert undefined or null to object/);
});
it('throws a TypeError with `null` as target', function() {
expect(assign).withArgs(null).to.throwException(function(e) {
expect(e).to.be.a(TypeError);
});
expect(() => assign(null)).to.throwException(/Cannot convert undefined or null to object/);
});
});