Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- class-transformer
- nodejs
- spring
- chai
- gradle
- 백엔드
- Database
- mysql
- IAC
- java
- 이더리움
- corretto
- nestjs
- docker
- Mocha
- typeorm
- restdocs
- ChatGPT
- 블록체인
- terraform
- 도서
- TypeScript
- 유데미
- Nestia
- 온라인강의
- 글또
- 리뷰
- blockchain
- Redis
- terraform cloud
Archives
- Today
- Total
목록Mocha (1)
끄적끄적

테스트를 하다보면 예외사항을 테스트해야 하는 경우가 자주 생긴다. 이 때 필자의 경우 어떻게 예외 테스트를 하고 있는지에 대해 이야기를 해보고자 한다. 이 포스팅에서는 커스텀한 에러를 던지고 있으며 그 형태는 아래와 같다고 가정하자. export class CustomError extends Error { name: string; message: string; code: string; stack?: string; constructor(code: string, message: string, name?: string, stack?: string) { super(message); this.name = name || code; this.message = message; this.code = code; if (..
개발/js & ts & node.js
2024. 1. 21. 20:18