Rename _ol_AssertionError_ to AssertionError

This commit is contained in:
Frederic Junod
2017-12-16 08:25:23 +01:00
parent e3bf72f90e
commit 3f3e412d10
4 changed files with 12 additions and 12 deletions

View File

@@ -1,25 +1,25 @@
import {VERSION} from '../../../src/ol/index.js';
import _ol_AssertionError_ from '../../../src/ol/AssertionError.js';
import AssertionError from '../../../src/ol/AssertionError.js';
describe('ol.AssertionError', function() {
it('generates an error', function() {
var error = new _ol_AssertionError_(42);
var error = new AssertionError(42);
expect(error).to.be.an(Error);
});
it('generates a message with a versioned url', function() {
var error = new _ol_AssertionError_(42);
var error = new AssertionError(42);
var path = VERSION ? VERSION.split('-')[0] : 'latest';
expect(error.message).to.be('Assertion failed. See https://openlayers.org/en/' + path + '/doc/errors/#42 for details.');
});
it('has an error code', function() {
var error = new _ol_AssertionError_(42);
var error = new AssertionError(42);
expect(error.code).to.be(42);
});
it('has a name', function() {
var error = new _ol_AssertionError_(42);
var error = new AssertionError(42);
expect(error.name).to.be('AssertionError');
});
});