Avoid modifying imports

This commit is contained in:
Tim Schaub
2017-08-17 12:06:33 -04:00
parent 7ea5fb023f
commit d3527bf910

View File

@@ -10,11 +10,9 @@ describe('ol.AssertionError', function() {
});
it('generates a message with a versioned url', function() {
var origVersion = ol.VERSION;
ol.VERSION = 'foo';
var error = new ol.AssertionError(42);
expect(error.message).to.be('Assertion failed. See https://openlayers.org/en/foo/doc/errors/#42 for details.');
ol.VERSION = origVersion;
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() {