We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99dc388 commit 1644cb6Copy full SHA for 1644cb6
test/map/utils/parseDMS.test.ts
@@ -1,3 +1,16 @@
1
import { describe, it } from 'vitest';
2
+import { parseDMS } from '../../../src/map/utils/parseDMS';
3
-describe.concurrent('', () => {});
4
+describe.concurrent('Parse Degrees Minutes Seconds Direction', () => {
5
+ it('Example', ({ expect }) => {
6
+ const res = parseDMS(`11°11'11.1"N 11°11'11.1"E`);
7
+
8
+ expect(res).toStrictEqual([11.186416666666666, 11.186416666666666]);
9
+ });
10
11
+ it('Negative Example', ({ expect }) => {
12
+ const res = parseDMS(`11°11'11.1"S 11°11'11.1"W`);
13
14
+ expect(res).toStrictEqual([-11.186416666666666, -11.186416666666666]);
15
16
+});
0 commit comments