-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(isValid3DCoordinate): add robust snapshot tests
Adds extensive snapshot testing to address #32.
- Loading branch information
1 parent
ae92f67
commit 56fbf92
Showing
2 changed files
with
32 additions
and
8 deletions.
There are no files selected for viewing
28 changes: 22 additions & 6 deletions
28
tests/coordinates/__snapshots__/isValid3DCoordinate.test.js.snap
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 |
---|---|---|
@@ -1,18 +1,34 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Error Snapshot Testing. Throws error: expect([0, 0, 0]).not.isValid3DCoordinate 1`] = ` | ||
"[2mexpect([22m[31m[longitude, latitude, altitude][39m[2m).not.isValid3DCoordinate()[22m | ||
exports[`Error Snapshot Testing. Throws error: Coordinate altitude value must be numeric 1`] = ` | ||
"[2mexpect([22m[31m[longitude, latitude, altitude][39m[2m).isValid3DCoordinate()[22m | ||
Expected input to not be a three element array with longitude between (-90 to 90), | ||
latitude between (-180 to 180), and numeric altitude. | ||
Coordinate altitude value must be numeric. | ||
Received: [31m[0, 0, 0][39m" | ||
Received: [31m[0, 0, true][39m" | ||
`; | ||
|
||
exports[`Error Snapshot Testing. Throws error: Coordinate must be an array of only three elments 1`] = ` | ||
"[2mexpect([22m[31m[longitude, latitude, altitude][39m[2m).isValid3DCoordinate()[22m | ||
Coordinate must be an array of only three elments. | ||
Received: [31m[0, 0][39m" | ||
`; | ||
|
||
exports[`Error Snapshot Testing. Throws error: expect([0, 0]).isValid3DCoordinate 1`] = ` | ||
exports[`Error Snapshot Testing. Throws error: Invalid input to matcher 1`] = ` | ||
"[2mexpect([22m[31m[longitude, latitude, altitude][39m[2m).isValid3DCoordinate()[22m | ||
Coordinate must be an array of only three elments. | ||
Received: [31m[0, 0][39m" | ||
`; | ||
|
||
exports[`Error Snapshot Testing. Throws error: Valid use case passes 1`] = ` | ||
"[2mexpect([22m[31m[longitude, latitude, altitude][39m[2m).not.isValid3DCoordinate()[22m | ||
Expected input to not be a three element array with longitude between (-90 to 90), | ||
latitude between (-180 to 180), and numeric altitude. | ||
Received: [31m[0, 0, 0][39m" | ||
`; |
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