-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bearing ranges, disableds in dropdowns and menus
* feat: bearing ranges plus tests * feat: added disabled option and disabled title to dropdown * Added disabled option to drop downs
- Loading branch information
1 parent
e9e1647
commit 64e926d
Showing
12 changed files
with
118 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { convertDDToDMS } from "./bearing"; | ||
|
||
describe("convertDDToDMS", () => { | ||
test("converts decimal-ish degrees to DMS", () => { | ||
expect(convertDDToDMS(-0.001, false, false)).toBe("-0° 00' 10\""); | ||
expect(convertDDToDMS(-10.001, false, false)).toBe("-10° 00' 10\""); | ||
expect(convertDDToDMS(-370.001, false, false)).toBe("-10° 00' 10\""); | ||
expect(convertDDToDMS(359.595999, false, false)).toBe("0° 00'"); | ||
expect(convertDDToDMS(369.696999, false, false)).toBe("10° 10' 10\""); | ||
expect(convertDDToDMS(221.555999, false, false)).toBe("221° 56'"); | ||
expect(convertDDToDMS(221.555999, false, true)).toBe("221° 56' 00.0\""); | ||
expect(convertDDToDMS(5)).toBe("+5° 00' 00.0\""); | ||
expect(convertDDToDMS(5.0)).toBe("+5° 00' 00.0\""); | ||
expect(convertDDToDMS(5.00001)).toBe("+5° 00' 00.1\""); | ||
expect(convertDDToDMS(5.1)).toBe("+5° 10' 00.0\""); | ||
expect(convertDDToDMS(5.12345)).toBe("+5° 12' 34.5\""); | ||
expect(convertDDToDMS(5.12345, false)).toBe("5° 12' 34.5\""); | ||
|
||
expect(convertDDToDMS(300)).toBe("+300° 00' 00.0\""); | ||
expect(convertDDToDMS(300.0)).toBe("+300° 00' 00.0\""); | ||
expect(convertDDToDMS(300.00001)).toBe("+300° 00' 00.1\""); | ||
expect(convertDDToDMS(300.1)).toBe("+300° 10' 00.0\""); | ||
expect(convertDDToDMS(300.12345)).toBe("+300° 12' 34.5\""); | ||
expect(convertDDToDMS(300.12345, false)).toBe("300° 12' 34.5\""); | ||
|
||
expect(convertDDToDMS(300, false, false)).toBe("300° 00'"); | ||
expect(convertDDToDMS(300.1, false, false)).toBe("300° 10'"); | ||
expect(convertDDToDMS(0, false)).toBe("0° 00'"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters