Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add travis file #17

Merged
merged 2 commits into from
Feb 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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