Files
xahau.js/test/client/errors.ts
Mayukha Vadari 949cc031ee Lints top-level test files (#1594)
* lint broadcastClient

* lint client

* fix most of connection

* remove unused files

* lint mockRippled

* lint mockRippledTest

* lint runClientTests

* lint setupClient

* lint setupClientWeb

* lint shamap

* lint testUtils

* resolve tsc issues

* Fix tests

* lint rest of connection

* respond to comments
2021-10-04 14:10:12 -04:00

19 lines
587 B
TypeScript

import { assert } from 'chai'
import { setupClient, teardownClient } from '../setupClient'
describe('client errors', function () {
beforeEach(setupClient)
afterEach(teardownClient)
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)]')
})
})