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
- nestjs
- TypeScript
- Mocha
- gradle
- 글또
- spring
- blockchain
- nodejs
- chai
- Database
- terraform
- terraform cloud
- java
- typeorm
- restdocs
- 온라인강의
- 도서
- mysql
- corretto
- 리뷰
- 백엔드
- docker
- Nestia
- ChatGPT
- class-transformer
- Redis
- 이더리움
- IAC
- 블록체인
- 유데미
Archives
- Today
- Total
목록Mocha (1)
끄적끄적
Chai 예외 검증 커스터마이징 (with Mocha)
테스트를 하다보면 예외사항을 테스트해야 하는 경우가 자주 생긴다. 이 때 필자의 경우 어떻게 예외 테스트를 하고 있는지에 대해 이야기를 해보고자 한다. 이 포스팅에서는 커스텀한 에러를 던지고 있으며 그 형태는 아래와 같다고 가정하자. 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