Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chai-leaflet

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-leaflet - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

7

chai-leaflet.js

@@ -57,6 +57,7 @@ /**

Assertion.addMethod('nearLatLng', function (expected, delta) {
function nearLatLng(expected, delta) {
delta = delta || 1e-4;
var actual = this._obj;
var expected = L.latLng(expected);

@@ -70,3 +71,5 @@ this.assert(

);
});
}
Assertion.addMethod('nearLatLng', nearLatLng);
Assertion.addMethod('near', nearLatLng);

@@ -73,0 +76,0 @@ Assertion.addMethod('zoom', function (zoom) {

{
"name": "chai-leaflet",
"version": "0.0.2",
"version": "0.0.3",
"description": "Chai assertions to use with Leaflet map apps",

@@ -5,0 +5,0 @@ "main": "chai-leaflet.js",

@@ -8,10 +8,11 @@ # chai-leaflet

foo.should.be.nearLatLng([51, 4]);
latlng.should.be.near([51, 4]);
map.should.have.view([33, 2], 4);
map.should.have.zoom(18);
```

@@ -10,2 +10,5 @@ 'use strict';

[1, 2].should.be.deepAlmostEqual([1, 2], 0.1);
[1.0, 2.0].should.be.deepAlmostEqual([1, 2], 0.1);
[1.01, 2.02].should.be.deepAlmostEqual([1, 2], 0.1);
[1, 2].should.not.be.deepAlmostEqual([1, 3], 0.1);

@@ -30,4 +33,5 @@ });

latlng.should.be.nearLatLng(latlng);
latlng.should.not.be.nearLatLng(L.latLng([4, 51]));
latlng.should.be.near(latlng);
latlng.should.be.near([51, 4]);
latlng.should.not.be.near(L.latLng([4, 51]));
});

@@ -40,4 +44,4 @@

latlng.should.be.nearLatLng(L.latLng(51.01, 4.01), delta);
latlng.should.not.be.nearLatLng(L.latLng(51.4, 4.4), delta);
latlng.should.be.near(L.latLng(51.01, 4.01), delta);
latlng.should.not.be.near(L.latLng(51.4, 4.4), delta);
});

@@ -44,0 +48,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc