Clean up some lint problems in specs
This commit is contained in:
@@ -106,10 +106,13 @@ describe('ol.collection', function() {
|
|||||||
it('does dispatch events', function() {
|
it('does dispatch events', function() {
|
||||||
var collection = new ol.Collection(['a', 'b']);
|
var collection = new ol.Collection(['a', 'b']);
|
||||||
var index, prev;
|
var index, prev;
|
||||||
goog.events.listen(collection, ol.CollectionEventType.SET_AT, function(e) {
|
goog.events.listen(
|
||||||
index = e.index;
|
collection,
|
||||||
prev = e.prev;
|
ol.CollectionEventType.SET_AT,
|
||||||
});
|
function(e) {
|
||||||
|
index = e.index;
|
||||||
|
prev = e.prev;
|
||||||
|
});
|
||||||
collection.setAt(1, 1);
|
collection.setAt(1, 1);
|
||||||
expect(index).toEqual(1);
|
expect(index).toEqual(1);
|
||||||
expect(prev).toEqual('b');
|
expect(prev).toEqual('b');
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ describe('ol.Object', function() {
|
|||||||
describe('get an unset property', function() {
|
describe('get an unset property', function() {
|
||||||
var v;
|
var v;
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
v = o.get('k');
|
v = o.get('k');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns undefined', function() {
|
it('returns undefined', function() {
|
||||||
@@ -108,7 +108,7 @@ describe('ol.Object', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('bindTo after set', function() {
|
describe('bindTo after set', function() {
|
||||||
|
|
||||||
it('gets expected value', function() {
|
it('gets expected value', function() {
|
||||||
o.set('k', 1);
|
o.set('k', 1);
|
||||||
o2.bindTo('k', o);
|
o2.bindTo('k', o);
|
||||||
@@ -118,7 +118,7 @@ describe('ol.Object', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('bindTo before set', function() {
|
describe('bindTo before set', function() {
|
||||||
|
|
||||||
it('gets expected value', function() {
|
it('gets expected value', function() {
|
||||||
o2.bindTo('k', o);
|
o2.bindTo('k', o);
|
||||||
o.set('k', 1);
|
o.set('k', 1);
|
||||||
@@ -129,7 +129,7 @@ describe('ol.Object', function() {
|
|||||||
|
|
||||||
describe('backwards', function() {
|
describe('backwards', function() {
|
||||||
describe('bindTo after set', function() {
|
describe('bindTo after set', function() {
|
||||||
|
|
||||||
it('gets expected value', function() {
|
it('gets expected value', function() {
|
||||||
o2.set('k', 1);
|
o2.set('k', 1);
|
||||||
o2.bindTo('k', o);
|
o2.bindTo('k', o);
|
||||||
@@ -139,7 +139,7 @@ describe('ol.Object', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('bindTo before set', function() {
|
describe('bindTo before set', function() {
|
||||||
|
|
||||||
it('gets expected value', function() {
|
it('gets expected value', function() {
|
||||||
o2.bindTo('k', o);
|
o2.bindTo('k', o);
|
||||||
o2.set('k', 1);
|
o2.set('k', 1);
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ describe('ol.Projection', function() {
|
|||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('gives that CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, EPSG:4326 are equivalent', function() {
|
it('gives that CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, EPSG:4326 are ' +
|
||||||
|
'equivalent', function() {
|
||||||
_testAllEquivalent([
|
_testAllEquivalent([
|
||||||
'CRS:84',
|
'CRS:84',
|
||||||
'urn:ogc:def:crs:EPSG:6.6:4326',
|
'urn:ogc:def:crs:EPSG:6.6:4326',
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ describe('ol.TileRange', function() {
|
|||||||
|
|
||||||
var tileCoords = [];
|
var tileCoords = [];
|
||||||
tileRange.forEachTileCoord(5, function(tileCoord) {
|
tileRange.forEachTileCoord(5, function(tileCoord) {
|
||||||
tileCoords.push(new ol.TileCoord(tileCoord.z, tileCoord.x, tileCoord.y));
|
tileCoords.push(
|
||||||
|
new ol.TileCoord(tileCoord.z, tileCoord.x, tileCoord.y));
|
||||||
});
|
});
|
||||||
|
|
||||||
expect(tileCoords.length).toEqual(4);
|
expect(tileCoords.length).toEqual(4);
|
||||||
|
|||||||
Reference in New Issue
Block a user