Permalink
Browse files

Other: Updated travis to pipe to codeclimate, coverage

  • Loading branch information...
dcodeIO committed Mar 4, 2017
1 parent a7ab103 commit e70fbe3492c37f009dbaccf910c1e0f81e8f0f44
Showing with 13 additions and 3 deletions.
  1. +2 −1 .codeclimate.yml
  2. +1 −1 .travis.yml
  3. +1 −1 package.json
  4. +1 −0 src/reader.js
  5. +8 −0 tests/api_writer-reader.js
@@ -12,4 +12,5 @@ ratings:
- "lib/path/**.js"
- "lib/pool/**.js"
- "lib/utf8/**.js"
exclude_paths:
exclude_paths:
- "**/tests/**"
@@ -22,4 +22,4 @@ matrix:
- node_js: 6
script: set -e; if [ -n "$SAUCE_USERNAME" ]; then npm install zuul@^3.11.1 zuul-ngrok@^4.0.0; travis_wait npm run zuul; sleep 3; fi
- node_js: 6
script: npm install coveralls@^2.11.15; npm run coverage-ci
script: npm install coveralls@^2.11.15 codeclimate-test-reporter@^0.4.1; npm run coverage-ci
@@ -28,7 +28,7 @@
"build": "gulp",
"changelog": "node scripts/changelog -w",
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js tests/node/*.js",
"coverage-ci": "npm run coverage && cat coverage/lcov.info | coveralls",
"coverage-ci": "npm run coverage && coveralls < coverage/lcov.info && codeclimate-test-reporter < coverage/lcov.info",
"docs": "jsdoc -c jsdoc.docs.json -R README.md --verbose --pedantic",
"lint": "eslint **/*.js",
"pages": "node scripts/pages",
@@ -46,6 +46,7 @@ var create_array = typeof Uint8Array !== "undefined"
return new Reader(buffer);
throw Error("illegal buffer");
}
/* istanbul ignore next */
: function create_array(buffer) {
if (Array.isArray(buffer))
return new Reader(buffer);
@@ -7,6 +7,14 @@ var Writer = protobuf.Writer,
tape.test("writer & reader", function(test) {
test.throws(function() {
Reader.create(1);
}, "should throw when creating a Reader from something else than a buffer");
test.doesNotThrow(function() {
Reader.create([]);
}, "should not throw when creating a Reader from an array (comp)");
// uint32, int32, sint32
var values = [

0 comments on commit e70fbe3

Please sign in to comment.