Organize tests

This commit is contained in:
Tim Schaub
2021-04-27 15:41:14 -07:00
parent 278e355795
commit 490cfabe91
599 changed files with 12374 additions and 1603 deletions

View File

@@ -0,0 +1,29 @@
import * as transforms from '../../../../../src/ol/proj/transforms.js';
import Projection from '../../../../../src/ol/proj/Projection.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);
});
});