Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/ccxt-dev/ccxt
- Loading branch information
Showing
14 changed files
with
165 additions
and
21 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
'use strict' | ||
|
||
/* ------------------------------------------------------------------------ */ | ||
|
||
const { setTimeout_safe | ||
, timeout | ||
, now | ||
, isWindows, | ||
Exchange } = require ('../../../../ccxt') | ||
|
||
// const { Exchange, keys, values, unique, index, aggregate } = require ('../../../ccxt') | ||
|
||
const { strictEqual: equal } = require ('assert') | ||
|
||
/* ------------------------------------------------------------------------ */ | ||
|
||
it ('iso8601', done => { | ||
const exchange = new Exchange ({ | ||
'id': 'chernobyl' | ||
}); | ||
|
||
equal (exchange.iso8601(514862627000), '1986-04-26T01:23:47.000Z'); | ||
equal (exchange.iso8601(0), '1970-01-01T00:00:00.000Z'); | ||
|
||
equal (exchange.iso8601(-1), undefined); | ||
equal (exchange.iso8601(), undefined); | ||
equal (exchange.iso8601(null), undefined); | ||
equal (exchange.iso8601(''), undefined); | ||
equal (exchange.iso8601('a'), undefined); | ||
equal (exchange.iso8601({}), undefined); | ||
|
||
done(); | ||
}); | ||
|
||
/* ------------------------------------------------------------------------ */ | ||
|
||
it ('parse8601', done => { | ||
const exchange = new Exchange ({ | ||
'id': 'fukusima' | ||
}); | ||
|
||
equal(exchange.parse8601('1986-04-26T01:23:47.000Z'), 514862627000); | ||
|
||
equal(exchange.parse8601('1977-13-13T00:00:00.000Z'), undefined); | ||
equal(exchange.parse8601('1986-04-26T25:71:47.000Z'), undefined); | ||
|
||
equal(exchange.parse8601('3333'), undefined); | ||
equal(exchange.parse8601('Sr90'), undefined); | ||
equal(exchange.parse8601(''), undefined); | ||
equal(exchange.parse8601(), undefined); | ||
equal(exchange.parse8601(null), undefined); | ||
equal(exchange.parse8601({}), undefined); | ||
equal(exchange.parse8601(33), undefined); | ||
|
||
done(); | ||
}); | ||
|
||
/* ------------------------------------------------------------------------ */ | ||
|
||
it ('parseDate', done => { | ||
const exchange = new Exchange ({ | ||
'id': 'TMI' | ||
}); | ||
|
||
equal(exchange.parseDate('1986-04-26 00:00:00'), 514857600000); | ||
equal(exchange.parseDate('1986-04-26T01:23:47.000Z'), 514862627000); | ||
equal(exchange.parseDate('1986-13-13 00:00:00'), undefined); | ||
|
||
done(); | ||
}); | ||
|
||
/* ------------------------------------------------------------------------ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ | |
|
||
namespace ccxt; | ||
|
||
$version = '1.14.133'; | ||
$version = '1.14.134'; | ||
|
||
// rounding mode | ||
const TRUNCATE = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters