mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-22 05:05:48 +00:00
[TEST] add test to verify HEX_ZERO is native currency
This commit is contained in:
@@ -27,6 +27,12 @@ describe('Currency', function() {
|
|||||||
assert(r.is_native());
|
assert(r.is_native());
|
||||||
assert.strictEqual('XRP', r.to_json());
|
assert.strictEqual('XRP', r.to_json());
|
||||||
});
|
});
|
||||||
|
it('from_json("0000000000000000000000000000000000000000").to_json() == "XRP"', function() {
|
||||||
|
var r = currency.from_json('0000000000000000000000000000000000000000');
|
||||||
|
assert(r.is_valid());
|
||||||
|
assert(r.is_native());
|
||||||
|
assert.strictEqual('XRP', r.to_json());
|
||||||
|
});
|
||||||
it('from_json("111").to_human()', function() {
|
it('from_json("111").to_human()', function() {
|
||||||
var r = currency.from_json("111");
|
var r = currency.from_json("111");
|
||||||
assert(r.is_valid());
|
assert(r.is_valid());
|
||||||
|
|||||||
Reference in New Issue
Block a user