Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(isValidBoundingBox): add robust snapshot tests
Adds extensive snapshot testing. Final matcher to get updated addressing this issue. Resolves: #32
- Loading branch information
1 parent
a37ec48
commit 063b94e
Showing
2 changed files
with
13 additions
and
29 deletions.
There are no files selected for viewing
24 changes: 8 additions & 16 deletions
24
tests/boundingBoxes/__snapshots__/isValidBoundingBox.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,33 +1,25 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Error Snapshot Testing. Throws error: expect([0, -95, 0, 0, 0, 0]).isValidBoundingBox 1`] = ` | ||
exports[`Error Snapshot Testing. Throws error: Bounding box must be an array of either four or six elments 1`] = ` | ||
"[2mexpect([22m[31m[west, south, (depth), east, north, (altitude)][39m[2m).isValidBoundingBox()[22m | ||
Bounding box southern value must be a number between -90 and 90. | ||
Bounding box must be an array of either four or six elments. | ||
Received: [31m[0, -95, 0, 0, 0, 0][39m" | ||
Received: [31m[0, 1, 2, 3, 4][39m" | ||
`; | ||
|
||
exports[`Error Snapshot Testing. Throws error: expect([0, 0, 0, 0, 0, 0]).not.isValidBoundingBox 1`] = ` | ||
"[2mexpect([22m[31m[west, south, (depth), east, north, (altitude)][39m[2m).not.isValidBoundingBox()[22m | ||
exports[`Error Snapshot Testing. Throws error: Invalid input to matcher 1`] = ` | ||
"[2mexpect([22m[31m[west, south, (depth), east, north, (altitude)][39m[2m).isValidBoundingBox()[22m | ||
Expected input to not be a four or six element bounding box array. | ||
Bounding box must be an array. | ||
Received: [31m[0, 0, 0, 0, 0, 0][39m" | ||
Received: [31mfalse[39m" | ||
`; | ||
|
||
exports[`Error Snapshot Testing. Throws error: expect([0, 0, 0, 0]).not.isValidBoundingBox 1`] = ` | ||
exports[`Error Snapshot Testing. Throws error: Valid use case passes 1`] = ` | ||
"[2mexpect([22m[31m[west, south, (depth), east, north, (altitude)][39m[2m).not.isValidBoundingBox()[22m | ||
Expected input to not be a four or six element bounding box array. | ||
Received: [31m[-20, 10, -10, 20][39m" | ||
`; | ||
|
||
exports[`Error Snapshot Testing. Throws error: expect([0, 0, 95, 0]).isValidBoundingBox 1`] = ` | ||
"[2mexpect([22m[31m[west, south, (depth), east, north, (altitude)][39m[2m).isValidBoundingBox()[22m | ||
Bounding box northern value must be a number between -90 and 90. | ||
Received: [31m[0, 0, 0, 95][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