Files
xahau.js/test/client/errors.ts
Mayukha Vadari a996fafe79 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
2021-10-04 14:10:11 -04:00

19 lines
579 B
TypeScript

import { assert } from 'chai'
import setupClient from '../setupClient'
describe('client errors', function () {
beforeEach(setupClient.setup)
afterEach(setupClient.teardown)
it('XrplError with data', async function () {
const error = new this.client.errors.XrplError('_message_', '_data_')
assert.strictEqual(error.toString(), "[XrplError(_message_, '_data_')]")
})
it('NotFoundError default message', async function () {
const error = new this.client.errors.NotFoundError()
assert.strictEqual(error.toString(), '[NotFoundError(Not found)]')
})
})