Require init() call before coreContext starts doing things

(closes #7304)
This commit is contained in:
Bryan Housel
2020-01-29 19:27:12 -05:00
parent fb4d658860
commit e19bcb77d5
45 changed files with 182 additions and 178 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ describe('iD.rendererFeatures', function() {
var context, features;
beforeEach(function() {
context = iD.coreContext();
context = iD.coreContext().init();
d3.select(document.createElement('div'))
.attr('id', 'map')
.call(context.map());
+1 -1
View File
@@ -3,7 +3,7 @@ describe('iD.Map', function() {
beforeEach(function() {
content = d3.select('body').append('div');
context = iD.coreContext();
context = iD.coreContext().init();
map = context.map();
content.call(map);
});
+7 -9
View File
@@ -2,7 +2,7 @@ describe('iD.TileLayer', function() {
var context, d, c;
beforeEach(function() {
context = iD.coreContext();
context = iD.coreContext().init();
d = d3.select(document.createElement('div'));
c = iD.TileLayer(context).projection(d3.geoMercator());
});
@@ -11,14 +11,12 @@ describe('iD.TileLayer', function() {
d.remove();
});
describe('iD.TileLayer', function() {
it('is instantiated', function() {
expect(c).to.be.ok;
});
it('is instantiated', function() {
expect(c).to.be.ok;
});
it('#dimensions', function() {
expect(c.dimensions([100, 100])).to.equal(c);
expect(c.dimensions()).to.eql([100,100]);
});
it('#dimensions', function() {
expect(c.dimensions([100, 100])).to.equal(c);
expect(c.dimensions()).to.eql([100,100]);
});
});