Skip to content

Commit

Permalink
Add coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
birkestroem committed Nov 12, 2020
1 parent 37dc0c7 commit 9bfcae2
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 3 deletions.
1 change: 1 addition & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: BBxFx4UNsB6qoGOcYY5CXfYrfcwjItWVm
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ language: node_js
node_js:
- 12
- 14

after_success: yarn coverage
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
## Basic usage example

[![Build Status](https://travis-ci.org/birkestroem/node-fetch-backoff.svg?branch=master)](https://travis-ci.org/birkestroem/node-fetch-backoff)
[![Coverage Status](https://coveralls.io/repos/github/birkestroem/node-fetch-backoff/badge.svg?branch=master)](https://coveralls.io/github/birkestroem/node-fetch-backoff?branch=master)


```js
const fbFactory = require('node-fetch-backoff');
const fetch = fbFactory({
const nfbFactory = require('node-fetch-backoff');
const fetch = nfbFactory({
// Msec or function. Default is exponential delay using msec from this option.
delay: 10 * 1000,

Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
clearMocks: true,
coverageDirectory: "coverage",
coverageReporters: ["json", "html"],
coverageReporters: ["lcov", "html"],
testEnvironment: "node",
};
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "A persistent version of fetch",
"main": "src/index.js",
"dependencies": {
"coveralls": "3.1.0",
"debug": "4.2.0",
"node-fetch": "2.6.1"
},
Expand All @@ -16,6 +17,7 @@
"nock": "13.0.5"
},
"scripts": {
"coverage": "jest --coverage && cat ./coverage/lcov.info | coveralls",
"lint": "eslint src",
"test": "jest"
},
Expand Down
21 changes: 21 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1167,6 +1167,17 @@ core-util-is@1.0.2:
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=

coveralls@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/coveralls/-/coveralls-3.1.0.tgz#13c754d5e7a2dd8b44fe5269e21ca394fb4d615b"
integrity sha512-sHxOu2ELzW8/NC1UP5XVLbZDzO4S3VxfFye3XYCznopHy02YjNkHcj5bKaVw2O7hVaBdBjEdQGpie4II1mWhuQ==
dependencies:
js-yaml "^3.13.1"
lcov-parse "^1.0.0"
log-driver "^1.2.7"
minimist "^1.2.5"
request "^2.88.2"

cross-spawn@^6.0.0:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
Expand Down Expand Up @@ -2880,6 +2891,11 @@ kleur@^3.0.3:
resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e"
integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==

lcov-parse@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-1.0.0.tgz#eb0d46b54111ebc561acb4c408ef9363bdc8f7e0"
integrity sha1-6w1GtUER68VhrLTECO+TY73I9+A=

leven@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
Expand Down Expand Up @@ -2946,6 +2962,11 @@ lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==

log-driver@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
integrity sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==

make-dir@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f"
Expand Down

0 comments on commit 9bfcae2

Please sign in to comment.