반응형
효소의 얕은 포장지 내용물 인쇄 방법
다음과 같은 것이 있습니다.
import {shallow} from "enzyme"
const wrapper = shallow(<SampleComponent/>);
포장지 내용물은 어떻게 봐야 하나요?
wrapper.debug()를 사용하면 다음과 같이 래퍼 요소를 나타내는 문자열을 얻을 수 있습니다.
import {shallow} from "enzyme";
const wrapper = shallow(<SampleComponent/>);
console.log(wrapper.debug());
import {shallow} from "enzyme";
const wrapper = shallow(<SampleComponent/>);
console.log(wrapper.html());
언급URL : https://stackoverflow.com/questions/50050675/how-to-print-the-contents-of-enzymes-shallow-wrapper
반응형
'programing' 카테고리의 다른 글
| Angular가 있는 루프 내부의 라벨을 사용하는 방법JS (0) | 2023.03.28 |
|---|---|
| Formik과 함께 Material-UI의 자동 완성 구성요소 사용 (0) | 2023.03.28 |
| 지시사항의 물음표 (0) | 2023.03.23 |
| WooCommerce에서 바리에이션 선택 시 제품 페이지 가격 업데이트 (0) | 2023.03.23 |
| 스프링 부트 @Autowired with Kotlin in @Service는 항상 null입니다. (0) | 2023.03.23 |