Files
openlayers/test/spec/ol/proj/transforms.test.js
Tim Schaub ad62739a6e Use blocked scoped variables
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00

33 lines
859 B
JavaScript

import Projection from '../../../../src/ol/proj/Projection.js';
import * as transforms from '../../../../src/ol/proj/transforms.js';
describe('transforms.remove()', function() {
const extent = [180, -90, 180, 90];
const units = 'degrees';
it('removes functions cached by transforms.add()', function() {
const foo = new Projection({
code: 'foo',
units: units,
extent: extent
});
const bar = new Projection({
code: 'bar',
units: units,
extent: extent
});
const transform = function(input, output, dimension) {
return input;
};
transforms.add(foo, bar, transform);
expect(transforms.get('foo', 'bar')).to.be(transform);
const removed = transforms.remove(foo, bar);
expect(removed).to.be(transform);
expect(transforms.get('foo', 'bar')).to.be(undefined);
});
});