Use blocked scoped variables

In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
Tim Schaub
2018-01-11 23:32:36 -07:00
parent 0bf2b04dee
commit ad62739a6e
684 changed files with 18120 additions and 18184 deletions

View File

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