Skip to content

Commit 1724324

Browse files
committed
Latest Updates of Whitespaces cleaning
1 parent 4bd70a1 commit 1724324

File tree

2 files changed

+56
-30
lines changed

2 files changed

+56
-30
lines changed

test/methods-test.js

Lines changed: 52 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('api', function() {
3636
done();
3737
});
3838
});
39-
it('txlist', function(done) {
39+
it('txlist', function(done){
4040
var api = init();
4141
var txlist = api.account.txlist('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
4242
txlist.then(function(res){
@@ -47,12 +47,10 @@ describe('api', function() {
4747
it('txlistinternal by hash', function(done){
4848
var api = init();
4949
var txlist = api.account.txlistinternal('0x40eb908387324f2b575b4879cd9d7188f69c8fc9d87c901b9e2daaea4b442170');
50-
txlist
51-
.then(function(res) {
52-
assert.ok(res);
53-
done();
54-
})
55-
.catch(done);
50+
txlist.then(function(res){
51+
assert.ok(res);
52+
done();
53+
}).catch(done);
5654
});
5755
it('txlistinternal by address', function(done){
5856
var api = init();
@@ -65,7 +63,7 @@ describe('api', function() {
6563
it('balance', function(done){
6664
var api = init();
6765
var balance = api.account.balance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
68-
balance.then(function(res) {
66+
balance.then(function(res){
6967
assert.ok(res);
7068
done();
7169
});
@@ -80,18 +78,19 @@ describe('api', function() {
8078
});
8179
});
8280
describe('stats', function(){
83-
it('ethsupply', function(done) {
81+
it('ethsupply', function(done){
8482
var api = init();
8583
var supply = api.stats.ethsupply();
86-
supply.then(function(res) {
84+
supply.then(function(res){
8785
assert.ok(res);
8886
done();
8987
});
9088
});
91-
it('tokensupply by tokenname', function(done) {
89+
90+
it('tokensupply by tokenname', function(done){
9291
var api = init();
9392
var supply = api.stats.tokensupply('MKR');
94-
supply.then(function(res) {
93+
supply.then(function(res){
9594
assert.ok(res);
9695
done();
9796
});
@@ -104,7 +103,8 @@ describe('api', function() {
104103
done();
105104
}).catch(done);
106105
});
107-
it('ethprice', function(done) {
106+
107+
it('ethprice', function(done){
108108
var api = init();
109109
var price = api.stats.ethprice();
110110
price.then(function(res){
@@ -113,30 +113,37 @@ describe('api', function() {
113113
}).catch(done);
114114
});
115115
});
116-
it('block.getblockreward', function(done) {
116+
117+
118+
it('block.getblockreward', function(done){
117119
var api = init();
118120
var blockreward = api.block.getblockreward();
119121
blockreward.then(function(res){
120122
assert.ok(res);
121123
done();
122124
});
123125
});
124-
it('transaction.getstatus', function(done) {
126+
127+
it('transaction.getstatus', function(done){
125128
var api = init();
126129
var status = api.transaction.getstatus('0x15f8e5ea1079d9a0bb04a4c58ae5fe7654b5b2b4463375ff7ffb490aa0032f3a');
127130
status.then(function(res){
128131
assert.ok(res);
129132
done();
130133
});
131134
});
132-
xit('contract.getabi', function(done) {
135+
136+
xit('contract.getabi', function(done){
133137
var api = init();
134138
var abi = api.contract.getabi('0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413');
135139
abi.then(function(res){
136140
assert.ok(res);
137141
done();
138142
});
139143
});
144+
145+
146+
140147
describe('proxy', function() {
141148
it('proxy.eth_blockNumber', function(done){
142149
var api = init();
@@ -146,71 +153,83 @@ describe('api', function() {
146153
done();
147154
});
148155
});
149-
it('proxy.eth_getBlockByNumber', function(done) {
156+
157+
158+
it('proxy.eth_getBlockByNumber', function(done){
150159
var api = init();
151160
var res = api.proxy.eth_getBlockByNumber('0x10d4f');
152161
res.then(function(res){
153162
assert.ok(res);
154163
done();
155164
});
156165
});
157-
it('proxy.eth_getUncleByBlockNumberAndIndex', function(done) {
166+
167+
168+
it('proxy.eth_getUncleByBlockNumberAndIndex', function(done){
158169
var api = init();
159170
var res = api.proxy.eth_getUncleByBlockNumberAndIndex('0x210A9B', '0x0');
160171
res.then(function(res){
161172
assert.ok(res);
162173
done();
163174
});
164175
});
165-
it('proxy.eth_getBlockTransactionCountByNumber', function(done) {
176+
177+
it('proxy.eth_getBlockTransactionCountByNumber', function(done){
166178
var api = init();
167179
var res = api.proxy.eth_getBlockTransactionCountByNumber('0x10FB78');
168180
res.then(function(res){
169181
assert.ok(res);
170182
done();
171183
});
172184
});
173-
it('proxy.eth_getTransactionByHash', function(done) {
185+
186+
it('proxy.eth_getTransactionByHash', function(done){
174187
var api = init();
175188
var res = api.proxy.eth_getTransactionByHash('0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1');
176189
res.then(function(res){
177190
assert.ok(res);
178191
done();
179192
});
180193
});
181-
it('proxy.eth_getTransactionByBlockNumberAndIndex', function(done) {
194+
195+
196+
it('proxy.eth_getTransactionByBlockNumberAndIndex', function(done){
182197
var api = init();
183198
var res = api.proxy.eth_getTransactionByBlockNumberAndIndex('0x10d4f', '0x0');
184199
res.then(function(res){
185200
assert.ok(res);
186201
done();
187202
});
188203
});
189-
it('proxy.eth_getTransactionCount', function(done) {
204+
205+
it('proxy.eth_getTransactionCount', function(done){
190206
var api = init();
191207
var res = api.proxy.eth_getTransactionCount('0x2910543af39aba0cd09dbb2d50200b3e800a63d2');
192208
res.then(function(res){
193209
assert.ok(res);
194210
done();
195211
});
196212
});
197-
xit('proxy.eth_sendRawTransaction', function(done) {
213+
214+
xit('proxy.eth_sendRawTransaction', function(done){
198215
var api = init();
199216
var res = api.proxy.eth_sendRawTransaction('0xf904808000831cfde080');
200217
res.then(function(res){
201218
assert.ok(res);
202219
done();
203220
});
204221
});
205-
it('proxy.eth_getTransactionReceipt', function(done) {
222+
223+
it('proxy.eth_getTransactionReceipt', function(done){
206224
var api = init();
207225
var res = api.proxy.eth_getTransactionReceipt('0x1e2910a262b1008d0616a0beb24c1a491d78771baa54a33e66065e03b1f46bc1');
208226
res.then(function(res){
209227
assert.ok(res);
210228
done();
211229
});
212230
});
213-
it('proxy.eth_call', function(done) {
231+
232+
it('proxy.eth_call', function(done){
214233
var api = init();
215234
var res = api.proxy.eth_call(
216235
'0xAEEF46DB4855E25702F8237E8f403FddcaF931C0',
@@ -222,31 +241,35 @@ describe('api', function() {
222241
done();
223242
});
224243
});
225-
it('proxy.eth_getCode', function(done) {
244+
245+
it('proxy.eth_getCode', function(done){
226246
var api = init();
227247
var res = api.proxy.eth_getCode('0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c', 'latest');
228248
res.then(function(res){
229249
assert.ok(res);
230250
done();
231251
});
232252
});
233-
it('proxy.eth_getStorageAt', function(done) {
253+
254+
it('proxy.eth_getStorageAt', function(done){
234255
var api = init();
235256
var res = api.proxy.eth_getStorageAt('0x6e03d9cce9d60f3e9f2597e13cd4c54c55330cfd', '0x0', 'latest');
236257
res.then(function(res){
237258
assert.ok(res);
238259
done();
239260
});
240261
});
241-
it('proxy.eth_gasPrice', function(done) {
262+
263+
it('proxy.eth_gasPrice', function(done){
242264
var api = init();
243265
var res = api.proxy.eth_gasPrice();
244266
res.then(function(res){
245267
assert.ok(res);
246268
done();
247269
});
248270
});
249-
xit('proxy.eth_estimateGas', function(done) {
271+
272+
xit('proxy.eth_estimateGas', function(done){
250273
var api = init();
251274
var res = api.proxy.eth_estimateGas(
252275
'0xf0160428a8552ac9bb7e050d90eeade4ddd52843',

test/testnet-balance-test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
'use strict';
22
const assert = require('chai').assert;
33
const init = require('../.').init;
4-
describe('testnet balance', function () {
4+
describe('testnet balance', function() {
55
it('returns a promise', function( ){
66
var api = init('YourApiKeyToken','ropsten');
77
var balance = api.account.balance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
88
assert.ok(balance.then);
99
});
10+
1011
it('executes the promise', function(done){
1112
var api = init('YourApiKeyToken','ropsten');
1213
var balance = api.account.balance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
1314
balance.then(function(){
1415
done();
1516
});
1617
});
18+
1719
it('has data', function(done){
1820
var api = init('YourApiKeyToken','ropsten');
1921
var balance = api.account.balance('0xde0b295669a9fd93d5f28d9ec85e40f4cb697bae');
@@ -22,4 +24,5 @@ describe('testnet balance', function () {
2224
done();
2325
});
2426
});
27+
2528
});

0 commit comments

Comments
 (0)