Skip to content

Commit 86e2dd7

Browse files
committed
add tests for distance
1 parent c957a95 commit 86e2dd7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { expect } from '@open-wc/testing';
2+
import { distance } from './math.js';
3+
4+
describe('distance', () => {
5+
it('should return the distance between two points', () => {
6+
expect(distance(5, 10)).to.equal(5);
7+
expect(distance(5.86732, 10.3989328)).to.equal(4.5316128);
8+
expect(distance(-25.8673, 12912.47831)).to.equal(12938.34561);
9+
});
10+
});

0 commit comments

Comments
 (0)