diff --git a/src/ol/AssertionError.js b/src/ol/AssertionError.js index d7f09b8242..2ecaf6db7d 100644 --- a/src/ol/AssertionError.js +++ b/src/ol/AssertionError.js @@ -72,7 +72,7 @@ class AssertionError extends Error { * @param {number} code Error code. */ constructor(code) { - const message = `Assertion failed. ${messages[code]}.`; + const message = messages[code]; super(message); diff --git a/test/node/ol/AssertionError.test.js b/test/node/ol/AssertionError.test.js index 6ea4290e3b..b64ca33394 100644 --- a/test/node/ol/AssertionError.test.js +++ b/test/node/ol/AssertionError.test.js @@ -9,9 +9,7 @@ describe('ol/AssertionError.js', function () { it('generates a message with a versioned url', function () { const error = new AssertionError(42); - expect(error.message).to.be( - 'Assertion failed. Question unknown, the answer is 42.' - ); + expect(error.message).to.be('Question unknown, the answer is 42'); }); it('has an error code', function () {