Skip to content

Commit 390001c

Browse files
committed
refactor: export default 방식 변경
전) export default class {} 후) class {} export defatul class 후자로 해야 jest test할때 제대로 인식 Resolve: #38
1 parent 0db8b30 commit 390001c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import CustomError from '.';
22
import { UNAUTHORIZED } from '@constants/http-status';
33

4-
export default class AuthorizationError extends CustomError {
4+
class AuthorizationError extends CustomError {
55
constructor(message = 'Unauthorized') {
66
super(message, UNAUTHORIZED);
77
}
88
}
9+
10+
export default AuthorizationError;

server/errors/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { INTERNAL_SERVER_ERROR } from '@constants/http-status';
22

3-
export default class CustomError extends Error {
3+
class CustomError extends Error {
44
message!: string;
55
status!: number;
66

@@ -14,3 +14,5 @@ export default class CustomError extends Error {
1414
this.status = status;
1515
}
1616
}
17+
18+
export default CustomError;

0 commit comments

Comments
 (0)