mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-04 01:40:08 +00:00
17 lines
533 B
TypeScript
17 lines
533 B
TypeScript
import { expect } from 'chai'
|
|
import { convertRestError } from '../src/convertRestError.js'
|
|
|
|
describe('[rest] convertRestError', () => {
|
|
it('Should contain important info', () => {
|
|
const convertedError = convertRestError(new Error(), {
|
|
status: 404,
|
|
error: 'error message',
|
|
body: 'error body',
|
|
ok: false
|
|
})
|
|
expect(convertedError.message).to.be.include('404')
|
|
expect(convertedError.message).to.be.include('error message')
|
|
expect(convertedError.message).to.be.include('error body')
|
|
})
|
|
})
|