Remove HTTPErrors from v3

This commit is contained in:
John Lees-Miller
2020-05-15 10:45:08 +01:00
parent 90494fd75f
commit 4b0060f0b1
3 changed files with 1 additions and 122 deletions
-32
View File
@@ -1,32 +0,0 @@
const { expect } = require('chai')
const HttpErrors = require('../http')
const { expectError } = require('./support')
describe('OError/http', function () {
it('is a valid OError', function () {
function foo() {
throw new HttpErrors.ConflictError()
}
try {
foo()
} catch (error) {
expectError(error, {
name: 'ConflictError',
klass: HttpErrors.ConflictError,
message: 'ConflictError: Conflict',
firstFrameRx: /foo/,
})
}
})
it('has status code', function () {
try {
throw new HttpErrors.ConflictError()
} catch (e) {
expect(e.statusCode).to.equal(409)
}
})
})