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,27 +4,27 @@ import * as transforms from '../../../../src/ol/proj/transforms.js';
|
||||
|
||||
describe('transforms.remove()', function() {
|
||||
|
||||
var extent = [180, -90, 180, 90];
|
||||
var units = 'degrees';
|
||||
const extent = [180, -90, 180, 90];
|
||||
const units = 'degrees';
|
||||
|
||||
it('removes functions cached by transforms.add()', function() {
|
||||
var foo = new Projection({
|
||||
const foo = new Projection({
|
||||
code: 'foo',
|
||||
units: units,
|
||||
extent: extent
|
||||
});
|
||||
var bar = new Projection({
|
||||
const bar = new Projection({
|
||||
code: 'bar',
|
||||
units: units,
|
||||
extent: extent
|
||||
});
|
||||
var transform = function(input, output, dimension) {
|
||||
const transform = function(input, output, dimension) {
|
||||
return input;
|
||||
};
|
||||
transforms.add(foo, bar, transform);
|
||||
expect(transforms.get('foo', 'bar')).to.be(transform);
|
||||
|
||||
var removed = transforms.remove(foo, bar);
|
||||
const removed = transforms.remove(foo, bar);
|
||||
expect(removed).to.be(transform);
|
||||
expect(transforms.get('foo', 'bar')).to.be(undefined);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user