Merge pull request #264 from strongloop/feature/fix-precision-in-tests-for-v0-11

relax too precise assertions in test/geo-point
This commit is contained in:
Miroslav Bajtoš 2014-05-16 16:31:52 +02:00
commit 2d1ccc73e6
1 changed files with 5 additions and 3 deletions

View File

@ -3,8 +3,9 @@ describe('GeoPoint', function() {
it("Get the distance to another `GeoPoint`", function() {
var here = new GeoPoint({lat: 10, lng: 10});
var there = new GeoPoint({lat: 5, lng: 5});
var distance = here.distanceTo(there, {type: 'meters'});
assert.equal(here.distanceTo(there, {type: 'meters'}), 782777.923052584);
assert.equal(Math.floor(distance), 782777);
});
});
@ -12,8 +13,9 @@ describe('GeoPoint', function() {
it("Get the distance between two points", function() {
var here = new GeoPoint({lat: 10, lng: 10});
var there = new GeoPoint({lat: 5, lng: 5});
var distance = GeoPoint.distanceBetween(here, there, {type: 'feet'});
assert.equal(GeoPoint.distanceBetween(here, there, {type: 'feet'}), 2568169.038886431);
assert.equal(Math.floor(distance), 2568169);
});
});