Completed
Pull Request — master (#99)
by
unknown
03:07
created

test/btccom-convert/btccom.address.test.js   A

Complexity

Total Complexity 4
Complexity/F 1

Size

Lines of Code 32
Function Count 4

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 0
wmc 4
c 2
b 0
f 1
nc 1
mnd 0
bc 4
fnc 4
dl 0
loc 32
rs 10
bpm 1
cpm 1
noi 5

2 Functions

Rating   Name   Duplication   Size   Complexity  
A sdk.then-0 0 3 1
A sdk.then-1 0 3 1
1
var blocktrail = require('../../main');
2
3
var btccom = !!JSON.parse(process.env.BTCCOM);
4
var opt = {
5
    apiKey : process.env.BLOCKTRAIL_SDK_APIKEY || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APIKEY",
6
    apiSecret : process.env.BLOCKTRAIL_SDK_APISECRET || "EXAMPLE_BLOCKTRAIL_SDK_NODEJS_APISECRET",
7
    btccom: btccom
8
};
9
console.log(opt);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
10
var sdk = blocktrail.BlocktrailSDK(opt);
11
12
/*
13
 For positive case
14
*/
15
sdk
16
    .address("3EU8LRmo5PgcSwnkn6Msbqc8BKNoQ7Xief")
17
    .then(function(tx) {
18
        console.log(tx);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
19
    }, function(error) {
20
        console.log(error);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
21
    });
22
23
/*
24
 For negative case
25
*/
26
sdk
27
    .address("dbaf14e1c476e76ea05a8b71921a46d6b06f0a950f1sdssd7c5f9f1a03b8fae467f10")
28
    .then(function(tx) {
29
        console.log(tx);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
30
    }, function(error) {
31
        console.log(error);
0 ignored issues
show
Debugging Code introduced by
console.log looks like debug code. Are you sure you do not want to remove it?
Loading history...
32
    });
33