Transformed

This commit is contained in:
Tim Schaub
2017-12-11 16:29:33 -07:00
parent 1cdb6a66f0
commit 7f47883c48
737 changed files with 22216 additions and 21609 deletions

View File

@@ -1,27 +1,25 @@
goog.require('ol');
goog.require('ol.AssertionError');
import _ol_ from '../../../src/ol.js';
import _ol_AssertionError_ from '../../../src/ol/AssertionError.js';
describe('ol.AssertionError', function() {
it('generates an error', function() {
var error = new ol.AssertionError(42);
var error = new _ol_AssertionError_(42);
expect(error).to.be.an(Error);
});
it('generates a message with a versioned url', function() {
var error = new ol.AssertionError(42);
var path = ol.VERSION ? ol.VERSION.split('-')[0] : 'latest';
var error = new _ol_AssertionError_(42);
var path = _ol_.VERSION ? _ol_.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 _ol_AssertionError_(42);
expect(error.code).to.be(42);
});
it('has a name', function() {
var error = new ol.AssertionError(42);
var error = new _ol_AssertionError_(42);
expect(error.name).to.be('AssertionError');
});
});