-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.js
42 lines (36 loc) · 860 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
var test = require('tape')
var RpcClient = require('bitcoind-rpc')
var env = require('node-env-file')
env('./.env', { raise: false })
var rpcuser = process.env.rpcuser
var rpcpassword = process.env.rpcpassword
var config = {
protocol: 'http',
user: rpcuser,
pass: rpcpassword,
host: '127.0.0.1',
port: '18332'
}
var rpc = new RpcClient(config)
var testnetCommonBlockchain = require('rpc-common-blockchain')({
rpc: rpc
})
require('./')({
network: 'testnet',
commonBlockchain: testnetCommonBlockchain,
rpc: rpc
}, function (err, rpcCommonWallet) {
if (err) {
// TODO
}
var commonWalletTests = require('abstract-common-wallet/tests')
var common = {
setup: function (t, cb) {
cb(null, rpcCommonWallet)
},
teardown: function (t, commonWallet, cb) {
cb()
}
}
commonWalletTests(test, '', common)
})