Move assertion messages into code and deprecate AssertionError
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import AssertionError from '../../../src/ol/AssertionError.js';
|
||||
import expect from '../expect.js';
|
||||
import {VERSION} from '../../../src/ol/util.js';
|
||||
|
||||
describe('ol/AssertionError.js', function () {
|
||||
it('generates an error', function () {
|
||||
@@ -10,11 +9,8 @@ describe('ol/AssertionError.js', function () {
|
||||
|
||||
it('generates a message with a versioned url', function () {
|
||||
const error = new AssertionError(42);
|
||||
const path = VERSION ? VERSION.split('-')[0] : 'latest';
|
||||
expect(error.message).to.be(
|
||||
'Assertion failed. See https://openlayers.org/en/' +
|
||||
path +
|
||||
'/doc/errors/#42 for details.'
|
||||
'Assertion failed. Question unknown, the answer is 42.'
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user