Use a nicer URL for the error descriptions

This commit is contained in:
Andreas Hocevar
2016-08-03 09:38:15 +02:00
parent 6f5ed17fc5
commit 55ab5704d4
4 changed files with 4 additions and 4 deletions

View File

@@ -13,13 +13,13 @@ describe('ol', function() {
describe('ol.AssertionError', function() {
it('generates a message', function() {
var error = new ol.AssertionError(42);
expect(error.message).to.be('Assertion failed. See /doc/errors.html#42 for details.');
expect(error.message).to.be('Assertion failed. See /doc/errors/#42 for details.');
});
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 http://openlayers.org/en/foo/doc/errors.html#42 for details.');
expect(error.message).to.be('Assertion failed. See http://openlayers.org/en/foo/doc/errors/#42 for details.');
ol.VERSION = origVersion;
});
it('has an error code', function() {