diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..ece9274 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "test/testnet-box"] + path = test/testnet-box + url = https://github.com/freewil/bitcoin-testnet-box diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a02efb7 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +VOWS=./node_modules/.bin/vows +BOX=test/testnet-box + +test: + $(MAKE) start + sleep 15 + $(MAKE) run-test + $(MAKE) stop + +start: + $(MAKE) -C $(BOX) start + +stop: + $(MAKE) -C $(BOX) stop + +run-test: + $(VOWS) test/api.js + +clean: + $(MAKE) -C $(BOX) clean + +.PHONY: test diff --git a/package.json b/package.json index e3eedfb..70e883a 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "node": ">=0.2.6" }, "scripts": { - "test": "node test/api.js" + "test": "make test" }, "optionalDependencies": {} } \ No newline at end of file diff --git a/test/config.example.js b/test/config.example.js index 43558d0..a002033 100644 --- a/test/config.example.js +++ b/test/config.example.js @@ -1,6 +1,6 @@ module.exports = { host: 'localhost', port: 8332, - user: 'jb55', - pass: 'thisisthepassword' + user: 'admin1', + pass: '123' }; diff --git a/test/testnet-box b/test/testnet-box new file mode 160000 index 0000000..4536d38 --- /dev/null +++ b/test/testnet-box @@ -0,0 +1 @@ +Subproject commit 4536d383493c3a20c58ecd3760b8303640833d7a