mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 04:05:52 +00:00
16 lines
486 B
TypeScript
16 lines
486 B
TypeScript
import { assert } from 'chai'
|
|
|
|
import { XrplError, NotFoundError } from '../../src'
|
|
|
|
describe('client errors', function () {
|
|
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)]')
|
|
})
|
|
})
|