mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Fix: Emit error events and return error on pathfind
This commit is contained in:
@@ -391,7 +391,7 @@ describe('RippleAPI', function() {
|
||||
return this.api.getTransactions(address, options).then(() => {
|
||||
assert(false, 'Should throw RippleError');
|
||||
}).catch(error => {
|
||||
assert(error instanceof common.core.RippleError);
|
||||
assert(error instanceof this.api.errors.RippleError);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -552,6 +552,14 @@ describe('RippleAPI', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('getPaths - error: srcActNotFound', function() {
|
||||
const pathfind = _.assign({}, requests.getPaths.normal,
|
||||
{source: {address: addresses.NOTFOUND}});
|
||||
return this.api.getPaths(pathfind).catch(error => {
|
||||
assert(error instanceof this.api.errors.RippleError);
|
||||
});
|
||||
});
|
||||
|
||||
it('getLedgerVersion', function() {
|
||||
assert.strictEqual(this.api.getLedgerVersion(), 8819951);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user