-
Notifications
You must be signed in to change notification settings - Fork 131
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
1 parent
ed81445
commit 3bec89f
Showing
11 changed files
with
382 additions
and
414 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = { | ||
env: { | ||
commonjs: true, | ||
es6: true, | ||
node: true, | ||
mocha: true | ||
}, | ||
extends: 'airbnb-base', | ||
globals: { | ||
Atomics: 'readonly', | ||
SharedArrayBuffer: 'readonly', | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 2018, | ||
}, | ||
rules: { | ||
'consistent-return': 0 | ||
}, | ||
}; |
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
node_modules | ||
npm-debug.log | ||
yarn.lock | ||
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 |
---|---|---|
@@ -1,5 +1,16 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- "8" | ||
- "10" | ||
- "11" | ||
matrix: | ||
include: | ||
- node_js: '10' | ||
env: COVERAGE=true # c8 only works on Node.js 10+ | ||
script: | | ||
if [ -z "$COVERAGE" ] | ||
then | ||
npm test | ||
else | ||
npm run coverage | ||
fi |
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,17 @@ | ||
# koa-body Test Info | ||
|
||
Running tests: | ||
```sh | ||
npm install | ||
npm test | ||
``` | ||
|
||
## Coverage | ||
To run coverage, you must be using [c8's supported version](https://github.com/bcoe/c8#supported-nodejs-versions) of Node.js, v10.12.0+. | ||
|
||
To get an HTML coverage report, run the following commands: | ||
```sh | ||
npm run coverage:html | ||
``` | ||
|
||
CI will fail if a line, function, and branch coverage percentage is not met. This is set in `package.json` in the `coverage` script. |
Oops, something went wrong.