enforce indentation in specs

This commit is contained in:
Vladimir Agafonkin 2015-09-25 13:55:37 +03:00
parent 301473ad4d
commit cfdbd10431
17 changed files with 145 additions and 153 deletions

View File

@ -4,8 +4,7 @@
"quotes": 0, "quotes": 0,
"no-shadow": 0, "no-shadow": 0,
"no-irregular-whitespace": 0, "no-irregular-whitespace": 0,
"no-console": 0, "no-console": 0
"indent": 0
}, },
"env": { "env": {
"mocha": true "mocha": true

View File

@ -204,6 +204,7 @@ describe('Popup', function () {
icon = new L.DivIcon({popupAnchor: offset}), icon = new L.DivIcon({popupAnchor: offset}),
marker1 = new L.Marker(latlng), marker1 = new L.Marker(latlng),
marker2 = new L.Marker(latlng, {icon: icon}); marker2 = new L.Marker(latlng, {icon: icon});
marker1.bindPopup('Popup').addTo(map); marker1.bindPopup('Popup').addTo(map);
marker1.openPopup(); marker1.openPopup();
var defaultLeft = parseInt(marker1._popup._container.style.left, 10); var defaultLeft = parseInt(marker1._popup._container.style.left, 10);

View File

@ -37,11 +37,8 @@ describe('Polygon', function () {
it("can be initialized with holes", function () { it("can be initialized with holes", function () {
var originalLatLngs = [ var originalLatLngs = [
[ //external ring [[0, 10], [10, 10], [10, 0]], // external ring
[0, 10], [10, 10], [10, 0] [[2, 3], [2, 4], [3, 4]] // hole
], [ //hole
[2, 3], [2, 4], [3, 4]
]
]; ];
var polygon = new L.Polygon(originalLatLngs); var polygon = new L.Polygon(originalLatLngs);
@ -116,11 +113,8 @@ describe('Polygon', function () {
it("can be set external ring and holes", function () { it("can be set external ring and holes", function () {
var latLngs = [ var latLngs = [
[ //external ring [[0, 10], [10, 10], [10, 0]], // external ring
[0, 10], [10, 10], [10, 0] [[2, 3], [2, 4], [3, 4]] // hole
], [ //hole
[2, 3], [2, 4], [3, 4]
]
]; ];
var polygon = new L.Polygon([]); var polygon = new L.Polygon([]);
@ -207,10 +201,8 @@ describe('Polygon', function () {
it("should return first latlngs on a multipolygon with hole", function () { it("should return first latlngs on a multipolygon with hole", function () {
var latlngs = [ var latlngs = [
[ [[L.latLng([0, 10]), L.latLng([10, 10]), L.latLng([10, 0])],
[L.latLng([0, 10]), L.latLng([10, 10]), L.latLng([10, 0])], [L.latLng([2, 3]), L.latLng([2, 4]), L.latLng([3, 4])]],
[L.latLng([2, 3]), L.latLng([2, 4]), L.latLng([3, 4])]
],
[[L.latLng([10, 20]), L.latLng([30, 40]), L.latLng([50, 60])]] [[L.latLng([10, 20]), L.latLng([30, 40]), L.latLng([50, 60])]]
]; ];

View File

@ -605,8 +605,8 @@ describe("Map", function () {
it('move to requested center and zoom, and call zoomend once', function (done) { it('move to requested center and zoom, and call zoomend once', function (done) {
var spy = sinon.spy(), var spy = sinon.spy(),
newCenter = new L.LatLng(10, 11), newCenter = new L.LatLng(10, 11),
newZoom = 12, newZoom = 12;
callback = function () { var callback = function () {
expect(map.getCenter()).to.eql(newCenter); expect(map.getCenter()).to.eql(newCenter);
expect(map.getZoom()).to.eql(newZoom); expect(map.getZoom()).to.eql(newZoom);
spy(); spy();

View File

@ -1,8 +1,8 @@
describe("Map.Drag", function () { describe("Map.Drag", function () {
describe("#addHook", function () { describe("#addHook", function () {
it("calls the map with dragging enabled", function () { it("calls the map with dragging enabled", function () {
var container = document.createElement('div'), var container = document.createElement('div');
map = new L.Map(container, { var map = new L.Map(container, {
dragging: true dragging: true
}); });
@ -11,8 +11,8 @@ describe("Map.Drag", function () {
expect(map.dragging.enabled()).to.be(true); expect(map.dragging.enabled()).to.be(true);
}); });
it("calls the map with dragging and worldCopyJump enabled", function () { it("calls the map with dragging and worldCopyJump enabled", function () {
var container = document.createElement('div'), var container = document.createElement('div');
map = new L.Map(container, { var map = new L.Map(container, {
dragging: true, dragging: true,
worldCopyJump: true worldCopyJump: true
}); });
@ -23,8 +23,8 @@ describe("Map.Drag", function () {
}); });
it("calls the map with dragging disabled and worldCopyJump enabled; " + it("calls the map with dragging disabled and worldCopyJump enabled; " +
"enables dragging after setting center and zoom", function () { "enables dragging after setting center and zoom", function () {
var container = document.createElement('div'), var container = document.createElement('div');
map = new L.Map(container, { var map = new L.Map(container, {
dragging: false, dragging: false,
worldCopyJump: true worldCopyJump: true
}); });