forked from arb/celebrate
-
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.
- Loading branch information
Showing
6 changed files
with
109 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,5 @@ lib-cov | |
complexity.md | ||
.vscode | ||
.eslintcache | ||
package-lock.json | ||
package-lock.json | ||
coverage/** |
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,13 @@ | ||
module.exports = { | ||
verbose: true, | ||
collectCoverageFrom: ['lib/index.js'], | ||
collectCoverage: true, | ||
coverageThreshold: { | ||
global: { | ||
branches: 100, | ||
functions: 100, | ||
lines: 100, | ||
statements: 100 | ||
} | ||
} | ||
}; |
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,29 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Celebrate Middleware errors() only includes key values if joi returns details 1`] = ` | ||
Object { | ||
"error": "Bad Request", | ||
"message": "child \\"first\\" fails because [\\"first\\" is required]", | ||
"statusCode": 400, | ||
"validation": Object { | ||
"keys": Array [], | ||
"source": "body", | ||
}, | ||
} | ||
`; | ||
|
||
exports[`Celebrate Middleware errors() responds with a joi error 1`] = ` | ||
Object { | ||
"error": "Bad Request", | ||
"message": "child \\"first\\" fails because [\\"first\\" is required]. child \\"last\\" fails because [\\"last\\" is required]. child \\"role\\" fails because [\\"role\\" must be a number]", | ||
"statusCode": 400, | ||
"validation": Object { | ||
"keys": Array [ | ||
"first", | ||
"last", | ||
"role", | ||
], | ||
"source": "query", | ||
}, | ||
} | ||
`; |
Oops, something went wrong.