nomics-platform
Advanced tools
Comparing version 0.13.3 to 0.13.4
@@ -119,5 +119,3 @@ const au = require('../au') | ||
second.find(t => t.id === trades[1].id), | ||
`Trades with since=${since} didn't contain an overlap with the first page. Expected to see trade with id ${ | ||
trades[1].id | ||
}` | ||
`Trades with since=${since} didn't contain an overlap with the first page. Expected to see trade with id ${trades[1].id}` | ||
) | ||
@@ -174,11 +172,7 @@ | ||
!second.find(t => t.timestamp < trades[0].timestamp), | ||
`Trades with since=${ | ||
trades[0].id | ||
} contained a trade with a timestamp before the since parameter. Only trades *after or equal to* the since id should be returned` | ||
`Trades with since=${trades[0].id} contained a trade with a timestamp before the since parameter. Only trades *after or equal to* the since id should be returned` | ||
) | ||
au.assert( | ||
second.find(t2 => t2.id === trades.find(t => t.timestamp > since).id), | ||
`Trades with since=${ | ||
trades[0].id | ||
} didn't contain an overlap with the first page. Expected to see trade with id ${trades[1].id}` | ||
`Trades with since=${trades[0].id} didn't contain an overlap with the first page. Expected to see trade with id ${trades[1].id}` | ||
) | ||
@@ -223,9 +217,21 @@ | ||
orderBook.bids.forEach(bid => { | ||
au.assert(typeof bid[0] === 'number', 'Expect bid price to be of type number') | ||
au.assert(typeof bid[1] === 'number', 'Expect bid amount to be of type number') | ||
const bid0 = parseFloat(bid[0]) | ||
const bid1 = parseFloat(bid[1]) | ||
au.assert(typeof bid0 === 'number' && !isNaN(bid0), 'Expect bid price to be of type number or numeric string') | ||
au.assert( | ||
typeof bid1 === 'number' && !isNaN(bid1), | ||
'Expect bid amount to be of type number or numeric string' | ||
) | ||
}) | ||
orderBook.asks.forEach(ask => { | ||
au.assert(typeof ask[0] === 'number', 'Expect ask price to be of type number') | ||
au.assert(typeof ask[1] === 'number', 'Expect ask amount to be of type number') | ||
const ask0 = parseFloat(ask[0]) | ||
const ask1 = parseFloat(ask[1]) | ||
au.assert(typeof ask0 === 'number' && !isNaN(ask0), 'Expect ask price to be of type number or numeric string') | ||
au.assert( | ||
typeof ask1 === 'number' && !isNaN(ask1), | ||
'Expect ask amount to be of type number or numeric string' | ||
) | ||
}) | ||
@@ -232,0 +238,0 @@ |
{ | ||
"name": "nomics-platform", | ||
"version": "0.13.3", | ||
"version": "0.13.4", | ||
"description": "Nomics Platform Toolkit", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
25271
554