Files
xahau.js/packages/xrpl/test/client/errors.ts
Jackson Mills 89b8833610 Fix Windows contributors being unable to build and test the xrpl mono repo (#1822)
* Let ripple-binary-codec to build on windows & nix

Co-authored-by: Justintime <justinthenicholasoftime@protonmail.com>
2021-11-23 12:29:06 -08:00

20 lines
603 B
TypeScript

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