diff --git a/.gitignore b/.gitignore index 3c3629e..cea4849 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -node_modules +node_modules/ +.nyc_output/ +coverage/ +package-lock.json diff --git a/.travis.yml b/.travis.yml index fc15089..e021160 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,3 +2,10 @@ language: node_js node_js: - node - lts/* +install: +- npm install +- npm install coveralls +script: +- npm run coverage +after_success: +- npx nyc report --reporter=text-lcov | npx coveralls diff --git a/README.md b/README.md index 9917234..2a729b3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # dns-packet -[![](https://img.shields.io/npm/v/dns-packet.svg?style=flat)](https://www.npmjs.org/package/dns-packet) [![](https://img.shields.io/npm/dm/dns-packet.svg)](https://www.npmjs.org/package/dns-packet) [![](https://api.travis-ci.org/mafintosh/dns-packet.svg?style=flat)](https://travis-ci.org/mafintosh/dns-packet) +[![](https://img.shields.io/npm/v/dns-packet.svg?style=flat)](https://www.npmjs.org/package/dns-packet) [![](https://img.shields.io/npm/dm/dns-packet.svg)](https://www.npmjs.org/package/dns-packet) [![](https://api.travis-ci.org/mafintosh/dns-packet.svg?style=flat)](https://travis-ci.org/mafintosh/dns-packet) [![Coverage Status](https://coveralls.io/repos/github/mafintosh/dns-packet/badge.svg?branch=master)](https://coveralls.io/github/mafintosh/dns-packet?branch=master) An [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compliant module for encoding / decoding DNS packets. Lifted out of [multicast-dns](https://github.com/mafintosh/multicast-dns) as a separate module. @@ -251,6 +251,8 @@ And an answer, additional, or authority looks like this #### `OPT` +[EDNS0](https://tools.ietf.org/html/rfc6891) options. + ``` js { type: 'OPT', diff --git a/package.json b/package.json index 3047caf..de1a85f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,11 @@ "node": ">=6" }, "scripts": { - "test": "eslint --color *.js examples/*.js && tape test.js" + "clean": "rm -rf coverage .nyc_output/", + "lint": "eslint --color *.js examples/*.js", + "pretest": "npm run lint", + "test": "tape test.js", + "coverage": "nyc -r html npm test" }, "dependencies": { "ip": "^1.1.5" @@ -22,6 +26,7 @@ "eslint-plugin-node": "^8.0.1", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-standard": "^4.0.0", + "nyc": "^13.3.0", "tape": "^4.10.1" }, "keywords": [