Skip to content

Commit

Permalink
Merge pull request #17 from fanatid/feature/travis
Browse files Browse the repository at this point in the history
add travis file
  • Loading branch information
jprichardson committed Feb 4, 2016
2 parents a9af05a + 17fbb5f commit 8632529
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
sudo: false
os:
- linux
language: node_js
node_js:
- "0.10"
- "0.11"
- "0.12"
- "4"
- "5"
env:
matrix:
- TEST_SUITE=unit
matrix:
include:
- node_js: "4"
env: TEST_SUITE=lint
script: npm run $TEST_SUITE
8 changes: 5 additions & 3 deletions lib/coininfo.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var assign = require('object-assign')

// annoyingly, this is for browserify
var coins = [
require('./coins/blk'),
Expand Down Expand Up @@ -55,7 +57,7 @@ coins.forEach(function (coin) {
})

function toBitcoinJS () {
return Object.assign({}, this, {
return assign({}, this, {
messagePrefix: null, // TODO
bip32: {
public: this.versions.bip32.public,
Expand All @@ -71,10 +73,10 @@ function toBitcoinJS () {
function toBitcore () {
// reverse magic
var nm = new Buffer(4)
nm.writeUInt32BE(this.protocol ? this.protocol.magic : 0)
nm.writeUInt32BE(this.protocol ? this.protocol.magic : 0, 0)
nm = nm.readUInt32LE(0)

return Object.assign({}, this, {
return assign({}, this, {
name: this.testnet ? 'testnet' : 'livenet',
alias: this.testnet ? 'testnet' : 'mainnet',
pubkeyhash: this.versions.public,
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
},
"main": "./lib/coininfo.js",
"scripts": {
"test": "standard && mocha"
"lint": "standard",
"test": "npm run lint && npm run unit",
"unit": "mocha"
},
"dependencies": {
"object-assign": "^4.0.1"
Expand Down

0 comments on commit 8632529

Please sign in to comment.