s3-orm
Version:
Object-Relational Mapping (ORM) interface for Amazon S3, enabling model-based data operations with indexing and querying capabilities
36 lines (24 loc) • 641 B
text/typescript
;
import AuthError from "../../lib/errors/AuthError";
describe('Lib:AuthError', () => {
test('AuthError()', (done) => {
let msg = 'This is a custom user error'
try {
throw new AuthError(msg)
}
catch(err){
expect(err.toString()).toEqual('Error: ' + msg)
done()
}
});
test('AuthError().code', (done) => {
let msg = 'This is a custom user error'
try {
throw new AuthError(msg)
}
catch(err){
expect(err.code).toEqual(403)
done()
}
});
})