mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-19 19:55:51 +00:00
[FEATURE] add getter for a Currency's iso_code
This commit is contained in:
@@ -172,4 +172,15 @@ describe('Currency', function() {
|
||||
assert.equal(Math.E, cur.get_interest_at(443845330 - 6291418827.05));
|
||||
});
|
||||
});
|
||||
describe('get_iso', function() {
|
||||
it('should get "XRP" iso_code', function() {
|
||||
assert.strictEqual('XRP', currency.from_json('XRP').get_iso());
|
||||
});
|
||||
it('should get iso_code', function() {
|
||||
assert.strictEqual('USD', currency.from_json('USD - US Dollar').get_iso());
|
||||
});
|
||||
it('should get iso_code', function() {
|
||||
assert.strictEqual('USD', currency.from_json('USD (0.5%pa)').get_iso());
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user