• 카테고리

    질문 & 답변
  • 세부 분야

    백엔드

  • 해결 여부

    미해결

npm run test:e2e

22.10.13 22:10 작성 조회수 268

0

수강생분들의 질문을 기다립니다!
- 에러에 해당하는 질문은 "에러가 발생한 상황에 대한 충분한 설명", "에러 메세지", "에러가 난 코드 스크린샷"을 함께 첨부해주세요.
- 언어에 해당하는 질문은 구글링 및 서치 후에 구체적으로 질문해주시면 좋습니다.
- 간단한 진로 및 방향성에 대한 질문은 메일로 보내주세요.
- 패키지 버전 관리은 실무 환경과 트랜드에 맞추어 강의를 업데이트 하고 있습니다. 강의를 그대로 따라갔는데 에러가 발생한다면 패키지 버전을 강의에서 사용하는 버전과 동일하게 맞춰주세요!
- 강의 노트, QA 목록, 공지 사항을 먼저 확인해주세요.
- 논리적이고 구체적인 질문은 학습 효과를 올립니다 :)

 

강의를 보시다가 혹시나 npm run test:e2e 를 돌려봤는데

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! amamov.com@1.8.0 test:e2e: jest --config ./test/jest-e2e.json

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the amamov.com@1.8.0 test:e2e script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /Users/anhyeongjun/.npm/_logs/2022-10-13T13_02_17_408Z-debug.log

이런 error를 맞이하신다면 { "moduleFileExtensions": ["js", "json", "ts"], "rootDir": ".", "testEnvironment": "node", "testRegex": ".e2e-spec.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" }, "moduleNameMapper": { "^src/(.*)$": "<rootDir>/../src/$1" } }

moduleNameMapper이부분이 들어가있는지 확인하신 후 없으면 넣어주면 test가 성공적으로 진행될 수 있습니다.

다만 윤상석 선생님
추가해서 test를 돌려보면
Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with --detectOpenHandles to troubleshoot this issue. 이런 오류가 나는데 이유가 무엇일까요?

답변 0

답변을 작성해보세요.

답변을 기다리고 있는 질문이에요.
첫번째 답변을 남겨보세요!