Unit test, e2e test 경로 오류 에러
Unit test 해결
package.json
"jest": {
"moduleNameMapper":{
"^src/(.*)$":"<rootDir>/$1"
},
...
"rootDir": "src",
moduleNameMapper 를 추가해주면 잘됨.
e2e test 해결
e2e는 jest-e2e.json 을 수정해줘야 된다.
"moduleNameMapper":{
"^src/(.*)$":"<rootDir>/../src/$1"
},
...
"rootDir":".",
같은 내용을 추가, 근데 rootDir이 달라서 조금 변경
'개발일지' 카테고리의 다른 글
nestjs oneToMany/ManyToOne relation 오류 (0) | 2021.02.01 |
---|---|
ts 7016 에러 해결법 (0) | 2021.01.16 |
postgresql JOIN 간단 예시 - 자꾸 잊어버려서 적어두는... (0) | 2020.06.19 |
toastify notification이 스크린 밖에서 뜰때 (0) | 2020.06.05 |
vertically , horizontally align center in React (0) | 2020.06.02 |