1
+ /* eslint-disable no-bitwise */
2
+ /* eslint-disable import/first */
3
+ /* eslint-disable import/extensions */
1
4
import request from 'request'
2
5
import helpers from '../../../lib/test_helpers.js'
3
6
import assert from 'assert'
@@ -44,11 +47,11 @@ describe('stats', function () {
44
47
helpers . assertTypesOfFields ( statsFieldsType , [ json ] )
45
48
assert (
46
49
~ transactionTypes . indexOf ( json . last_transaction_type ) ,
47
- `Unexpected transaction type '${ json . last_transaction_type } '`
50
+ `Unexpected transaction type '${ json . last_transaction_type } '` ,
48
51
)
49
52
assert (
50
53
moment ( json . timestampApis , timestampFormat , true ) . isValid ( ) ,
51
- `Unexpected timestamp format, ${ json . timestampApis } ' does not match ${ timestampFormat } `
54
+ `Unexpected timestamp format, ${ json . timestampApis } ' does not match ${ timestampFormat } ` ,
52
55
)
53
56
done ( )
54
57
} )
@@ -81,21 +84,21 @@ describe('history', function () {
81
84
helpers . assertTypesOfFields ( historyFieldsType , json . results )
82
85
assert (
83
86
json . currency . constructor === String ,
84
- 'Unexpected currency type, should be String'
87
+ 'Unexpected currency type, should be String' ,
85
88
)
86
89
assert (
87
90
json . market . constructor === String ,
88
- 'Unexpected market type, should be String'
91
+ 'Unexpected market type, should be String' ,
89
92
)
90
93
assert (
91
94
moment ( json . timestampApis , timestampFormat , true ) . isValid ( ) ,
92
- `Unexpected timestamp format, '${ json . timestampApis } ' does not match ${ timestampFormat } `
95
+ `Unexpected timestamp format, '${ json . timestampApis } ' does not match ${ timestampFormat } ` ,
93
96
)
94
97
json . results . forEach ( ( result , i ) => {
95
98
assert (
96
99
moment ( result . date , dateFormat , true ) . isValid ( ) ,
97
100
( `Unexpected date format in result #${ i } ;` +
98
- ` '${ result . date } ' does not match ${ dateFormat } ` )
101
+ ` '${ result . date } ' does not match ${ dateFormat } ` ) ,
99
102
)
100
103
} )
101
104
done ( )
@@ -131,12 +134,12 @@ describe('transactions', function () {
131
134
json . results . forEach ( ( result , i ) => {
132
135
assert (
133
136
~ transactionTypes . indexOf ( result . type ) ,
134
- `Unexpected transaction type '${ result . type } ' in result #${ i } `
137
+ `Unexpected transaction type '${ result . type } ' in result #${ i } ` ,
135
138
)
136
139
assert (
137
140
moment ( result . timestamp , timestampFormat , true ) . isValid ( ) ,
138
141
( `Unexpected timestamp format in result #${ i } ;` +
139
- ` '${ result . timestamp } ' does not match ${ timestampFormat } ` )
142
+ ` '${ result . timestamp } ' does not match ${ timestampFormat } ` ) ,
140
143
)
141
144
} )
142
145
done ( )
@@ -171,7 +174,7 @@ describe('order-book', function () {
171
174
assert (
172
175
moment ( result . timestamp , timestampFormat , true ) . isValid ( ) ,
173
176
( `Unexpected timestamp format in ask result #${ i } ;` +
174
- ` '${ result . timestamp } ' does not match ${ timestampFormat } ` )
177
+ ` '${ result . timestamp } ' does not match ${ timestampFormat } ` ) ,
175
178
)
176
179
} )
177
180
assert ( json . bid , 'Does not contain a \'bid\' field' )
@@ -181,7 +184,7 @@ describe('order-book', function () {
181
184
assert (
182
185
moment ( result . timestamp , timestampFormat , true ) . isValid ( ) ,
183
186
( `Unexpected timestamp format in bid result #${ i } ;` +
184
- ` "${ result . timestamp } " does not match ${ timestampFormat } ` )
187
+ ` "${ result . timestamp } " does not match ${ timestampFormat } ` ) ,
185
188
)
186
189
} )
187
190
done ( )
0 commit comments