Merge Complete

This commit is contained in:
Luis Fernando Molina committed 2020-11-20 20:28:04 +01:00
1 parent 482ef7a81a
commit dabe23d505
6483 files changed

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
'use strict'
// ----------------------------------------------------------------------------
const log = require ('ololog')
, ansi = require ('ansicolor').nice
, chai = require ('chai')
, ccxt = require ('../../../ccxt.js')
, expect = chai.expect
, assert = chai.assert
/* ------------------------------------------------------------------------ */
module.exports = async (exchange, symbol) => {
if (!exchange.has.createOrder) {
log ('createOrder not supported')
return
}
try {
await exchange.createLimitBuyOrder (symbol, 0, 0)
assert.fail ()
} catch (e) {
if (e instanceof ccxt.InvalidOrder) {
log ('InvalidOrder thrown as expected')
return
} else {
log ('InvalidOrder failed, exception follows:')
throw e
}
}
}