mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 01:51:54 +00:00
21 lines
420 B
JavaScript
21 lines
420 B
JavaScript
|
const OError = require('..')
|
||
|
const HttpErrors = require('../http')
|
||
|
|
||
|
describe('OError/http', () => {
|
||
|
it('is instance of OError', () => {
|
||
|
try {
|
||
|
throw new HttpErrors.ConflictError()
|
||
|
} catch (e) {
|
||
|
expect(e).to.be.instanceof(OError)
|
||
|
}
|
||
|
})
|
||
|
|
||
|
it('has status code', () => {
|
||
|
try {
|
||
|
throw new HttpErrors.ConflictError()
|
||
|
} catch (e) {
|
||
|
expect(e.statusCode).to.equal(409)
|
||
|
}
|
||
|
})
|
||
|
})
|