Lints src/common (#1595)

* lint errors (and remove unused error types)

* lint fee

* lint index

* lint ecdsa

* fix tests

* remove address tests from getFee

* fix more tests

* fix tests

* respond to comments
This commit is contained in:
Mayukha Vadari
2021-09-03 18:32:52 -05:00
parent e200de3073
commit a996fafe79
13 changed files with 137 additions and 152 deletions

View File

@@ -11,7 +11,7 @@ import {
DisconnectedError,
NotConnectedError,
ResponseFormatError,
RippleError,
XrplError,
TimeoutError,
} from '../src/common/errors'
@@ -207,11 +207,11 @@ describe('Connection', function () {
})
it('DisconnectedError on initial onOpen send', async function () {
// _onOpen previously could throw PromiseRejectionHandledWarning: Promise rejection was handled asynchronously
// onOpen previously could throw PromiseRejectionHandledWarning: Promise rejection was handled asynchronously
// do not rely on the client.setup hook to test this as it bypasses the case, disconnect client connection first
await this.client.disconnect()
// stub _onOpen to only run logic relevant to test case
// stub onOpen to only run logic relevant to test case
this.client.connection.onOpen = () => {
// overload websocket send on open when _ws exists
this.client.connection.ws.send = function (_0, _1, _2) {
@@ -420,7 +420,7 @@ describe('Connection', function () {
new Client({
servers: ['wss://server1.com', 'wss://server2.com'],
} as any)
}, RippleError)
}, XrplError)
})
it('connect throws error', function (done) {