utils/ts-src/distance.test.ts
Martin Donnelly c30b36b3f6 init
2020-11-17 11:16:34 +00:00

14 lines
391 B
TypeScript

import { distance } from './distance';
import { LatLong } from './latLong';
test('Should return the correct Base32 value', () => {
expect(distance(1, 1, 2, 2)).toEqual(157.22543203805722);
});
test('Should return the correct Base32 value', () => {
const a: LatLong = new LatLong(1, 1);
const b: LatLong = new LatLong(2, 2);
expect(distance(a, b)).toEqual(157.22543203805722);
});