mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-03 13:38:04 +02:00
Require init() call before coreContext starts doing things
(closes #7304)
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user