mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Better error message when using methods that require a connection when servers are not provided
This commit is contained in:
@@ -884,6 +884,15 @@ describe('RippleAPI - offline', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('getServerInfo - offline', function() {
|
||||
const api = new RippleAPI();
|
||||
return api.getServerInfo().then(() => {
|
||||
assert(false, 'Should throw error');
|
||||
}).catch(error => {
|
||||
assert(error instanceof api.errors.NotConnectedError);
|
||||
});
|
||||
});
|
||||
|
||||
it('computeLedgerHash', function() {
|
||||
const api = new RippleAPI();
|
||||
const header = requests.computeLedgerHash.header;
|
||||
|
||||
Reference in New Issue
Block a user