Consistent spacing between keys and values in object literal
Related to https://github.com/openlayers/eslint-config-openlayers/pull/9
This commit is contained in:
@@ -32,7 +32,7 @@ describe('ol.format.EsriJSON', function() {
|
||||
|
||||
var multiPointEsriJSON = {
|
||||
geometry: {
|
||||
'points' : [[102.0, 0.0], [103.0, 1.0]]
|
||||
'points': [[102.0, 0.0], [103.0, 1.0]]
|
||||
},
|
||||
attributes: {
|
||||
'prop0': 'value0'
|
||||
|
||||
@@ -60,7 +60,7 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
}),
|
||||
style: new ol.style.Style({
|
||||
image: new ol.style.Icon({
|
||||
img : img,
|
||||
img: img,
|
||||
imgSize: [1, 1]
|
||||
})
|
||||
})
|
||||
@@ -151,13 +151,13 @@ describe('ol.renderer.canvas.Map', function() {
|
||||
];
|
||||
|
||||
for (var i = 0; i < 4; i++) {
|
||||
map.forEachFeatureAtPixel(pixelsInside[i], cb1, {hitTolerance:10});
|
||||
map.forEachFeatureAtPixel(pixelsInside[i], cb1, {hitTolerance: 10});
|
||||
}
|
||||
expect(cb1.callCount).to.be(4);
|
||||
expect(cb1.firstCall.args[1]).to.be(layer);
|
||||
|
||||
for (var j = 0; j < 4; j++) {
|
||||
map.forEachFeatureAtPixel(pixelsOutside[j], cb2, {hitTolerance:10});
|
||||
map.forEachFeatureAtPixel(pixelsOutside[j], cb2, {hitTolerance: 10});
|
||||
}
|
||||
expect(cb2).not.to.be.called();
|
||||
});
|
||||
|
||||
@@ -97,7 +97,7 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new ol.source.ImageArcGISRest(options);
|
||||
source.updateParams({'TEST':'newValue'});
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var image = source.getImage([3, 2, -7, 1], resolution, pixelRatio, proj3857);
|
||||
var uri = new URL(image.src_);
|
||||
@@ -122,22 +122,22 @@ describe('ol.source.ImageArcGISRest', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new ol.source.ImageArcGISRest(options);
|
||||
source.updateParams({'TEST2':'newValue'});
|
||||
source.updateParams({'TEST2': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
|
||||
expect(setParams).to.eql({TEST:'value', TEST2:'newValue'});
|
||||
expect(setParams).to.eql({TEST: 'value', TEST2: 'newValue'});
|
||||
});
|
||||
|
||||
it('verify on update a param', function() {
|
||||
options.params.TEST = 'value';
|
||||
|
||||
var source = new ol.source.ImageArcGISRest(options);
|
||||
source.updateParams({'TEST':'newValue'});
|
||||
source.updateParams({'TEST': 'newValue'});
|
||||
|
||||
var setParams = source.getParams();
|
||||
|
||||
expect(setParams).to.eql({TEST:'newValue'});
|
||||
expect(setParams).to.eql({TEST: 'newValue'});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user