테스트 실행 시 fail이 발생하는데 왜 그런걸까요??ㅜㅜ
1495
작성한 질문수 31
안녕하세요. 테스트 진행 중에 fail이 발생해서 왜 그런지 잘 모르겠습니다.
아래는 fail 로그예요
FAIL src/App.test.js
✕ renders learn react link (42ms)
● renders learn react link
Unable to find an element with the text: /learn react/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
<body>
<div>
<div
class="App"
>
<header
class="App-header"
>
<img
alt="logo"
class="App-logo"
src="logo.svg"
/>
<p>
Edit
<code>
src/App.js
</code>
and save to reload.
</p>
<a
class="App-link"
href="https://reactjs.org"
rel="noopener noreferrer"
target="_blank"
>
반갑습니다.
</a>
</header>
</div>
</div>
</body>
5 | test('renders learn react link', () => {
6 | const { getByText } = render(<App />);
> 7 | const linkElement = getByText(/learn react/i);
| ^
8 | expect(linkElement).toBeInTheDocument();
9 | });
10 |
at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:34:12)
at node_modules/@testing-library/dom/dist/query-helpers.js:71:38
at getByText (node_modules/@testing-library/dom/dist/query-helpers.js:54:17)
at Object.<anonymous> (src/App.test.js:7:23)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 1.958s
Ran all test suites.
답변 1
Docker Containers간 통신 할 때 나타나는 에러 강의 질문
0
94
1
WINDOW + Vite를 사용하여 소스 코드 변경이 반영되지 않는 현상
0
102
1
도커 컨테이너 끼리 SSL 통신 시 문제가 생깁니다..
0
232
1
도표 강의 자료 사용이 불가합니다. (권한 문제)
0
153
1
Docker compose 관련 공유
0
152
1
트레비스가 유료화가 되어 테스트가 어려워 챕터8에서 고민중입니다.
0
84
1
강사님 혹시 vscode 어떤 테마 쓰시나요..?
0
307
1
The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist.
0
112
1
travis ci가 이제 유료화가 된 것 같습니다;;;
0
220
2
docker-compose up 에러 공유 드립니다
0
298
1
Elastic Beanstalk에서 도메인 클릭시 react 이미지가 안나오고 다른 화면이 나오는데
0
180
1
도커 빌드 시간이 너무 오래걸려요..
0
1089
2
docker-compose down 이후에도 containers에 redis가 남아 있는 이유
0
172
1
도커 볼륨이 작동이 안되는것 같아서 질문드립니다!
0
223
2
docker-compose 가 Docker Desktop 에서 빠진건가요? command not found 라고 뜨네요
0
287
1
Error response from daemon: The system cannot find the file specified.
0
227
1
draw.io 오류
0
680
1
Docker Volume 오류(reference, lowercase)
0
571
1
[섹션3 - 내가 만든 이미지 기억하기 쉬운 이름 주기] 네이밍/태그 에러
0
232
1
axios오류 문의드립니다!
0
346
1
node.js version
0
494
1
안녕하세요 마지막 강의 질문 있습니다.
0
440
1
Deploy를 계속 실패합니다.
3
1398
4
TravisCI에서 계속 에러가 납니다....
0
364
1





