Merge pull request #1419 from tmcw/test-jshint
Fix semicolons, breaking, whitespace, duplicate var statements.
This commit is contained in:
commit
8e176f48aa
@ -2,5 +2,5 @@ describe("Control.Scale", function () {
|
||||
it("can be added to an unloaded map", function () {
|
||||
var map = L.map(document.createElement('div'));
|
||||
new L.Control.Scale().addTo(map);
|
||||
})
|
||||
});
|
||||
});
|
||||
|
@ -22,7 +22,7 @@ describe('Events', function() {
|
||||
obj.addEventListener('test', spy2);
|
||||
obj.addEventListener('other', spy3);
|
||||
obj.addEventListener({ test: spy4, other: spy5 });
|
||||
obj.addEventListener({'test other': spy6 })
|
||||
obj.addEventListener({'test other': spy6 });
|
||||
|
||||
expect(spy).not.toHaveBeenCalled();
|
||||
expect(spy2).not.toHaveBeenCalled();
|
||||
|
@ -50,7 +50,7 @@ describe('DomUtil', function() {
|
||||
el.className = 'foo bar barz';
|
||||
L.DomUtil.removeClass(el, 'bar');
|
||||
expect(el.className).toEqual('foo barz');
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
describe('#documentIsLtr', function () {
|
||||
|
@ -5,9 +5,9 @@ describe('LatLng', function() {
|
||||
expect(a.lat).toEqual(25);
|
||||
expect(a.lng).toEqual(74);
|
||||
|
||||
var a = new L.LatLng(-25, -74);
|
||||
expect(a.lat).toEqual(-25);
|
||||
expect(a.lng).toEqual(-74);
|
||||
var b = new L.LatLng(-25, -74);
|
||||
expect(b.lat).toEqual(-25);
|
||||
expect(b.lng).toEqual(-74);
|
||||
});
|
||||
|
||||
it('should throw error if invalid lat or lng', function () {
|
||||
|
@ -4,7 +4,7 @@ xdescribe("Projection.Mercator", function() {
|
||||
beforeEach(function() {
|
||||
function almostEqual(a, b, p) {
|
||||
return Math.abs(a - b) <= (p || 1.0E-12);
|
||||
};
|
||||
}
|
||||
this.addMatchers({
|
||||
toAlmostEqual: function(expected, margin) {
|
||||
var p1 = this.actual,
|
||||
|
@ -36,8 +36,8 @@ describe("Map", function () {
|
||||
});
|
||||
|
||||
describe("#getBounds", function () {
|
||||
it("is safe to call from within a moveend callback during initial "
|
||||
+ "load (#1027)", function () {
|
||||
it("is safe to call from within a moveend callback during initial " +
|
||||
"load (#1027)", function () {
|
||||
map.on("moveend", function () {
|
||||
map.getBounds();
|
||||
});
|
||||
@ -47,8 +47,8 @@ describe("Map", function () {
|
||||
});
|
||||
|
||||
describe("#getMinZoom and #getMaxZoom", function () {
|
||||
it("The minZoom and maxZoom options overrides any"
|
||||
+ " minZoom and maxZoom set on layers", function () {
|
||||
it("The minZoom and maxZoom options overrides any" +
|
||||
" minZoom and maxZoom set on layers", function () {
|
||||
var c = document.createElement('div'),
|
||||
map = L.map(c, { minZoom: 5, maxZoom: 10 });
|
||||
L.tileLayer("{z}{x}{y}", { minZoom:0, maxZoom: 10 }).addTo(map);
|
||||
|
Loading…
Reference in New Issue
Block a user