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:
@@ -4,15 +4,15 @@ import View from '../../../src/ol/View.js';
|
||||
|
||||
|
||||
describe('ol.Overlay', function() {
|
||||
var target, map;
|
||||
let target, map;
|
||||
|
||||
var width = 360;
|
||||
var height = 180;
|
||||
const width = 360;
|
||||
const height = 180;
|
||||
|
||||
beforeEach(function() {
|
||||
target = document.createElement('div');
|
||||
|
||||
var style = target.style;
|
||||
const style = target.style;
|
||||
style.position = 'absolute';
|
||||
style.left = '-1000px';
|
||||
style.top = '-1000px';
|
||||
@@ -38,12 +38,12 @@ describe('ol.Overlay', function() {
|
||||
describe('constructor', function() {
|
||||
|
||||
it('can be constructed with minimal arguments', function() {
|
||||
var instance = new Overlay({});
|
||||
const instance = new Overlay({});
|
||||
expect(instance).to.be.an(Overlay);
|
||||
});
|
||||
|
||||
it('can be constructed with className', function() {
|
||||
var instance = new Overlay({className: 'my-class'});
|
||||
const instance = new Overlay({className: 'my-class'});
|
||||
expect(instance).to.be.an(Overlay);
|
||||
expect(instance.element.className).to.be('my-class');
|
||||
});
|
||||
@@ -51,7 +51,7 @@ describe('ol.Overlay', function() {
|
||||
});
|
||||
|
||||
describe('#getId()', function() {
|
||||
var overlay, target;
|
||||
let overlay, target;
|
||||
|
||||
beforeEach(function() {
|
||||
target = document.createElement('div');
|
||||
@@ -80,7 +80,7 @@ describe('ol.Overlay', function() {
|
||||
});
|
||||
|
||||
describe('#setVisible()', function() {
|
||||
var overlay, target;
|
||||
let overlay, target;
|
||||
|
||||
beforeEach(function() {
|
||||
target = document.createElement('div');
|
||||
|
||||
Reference in New Issue
Block a user