[test] EgovPaging·EgovSelect·EgovRadioButton 컴포넌트 단위 테스트 추가#116
Open
dasomel wants to merge 1 commit into
Open
Conversation
vitest 4.x에서 jsdom 환경 구동에 필요한 jsdom 패키지가 devDependencies에 누락되어 있어 함께 추가한다. - jsdom ^26.1.0 devDependencies 추가 (vitest 4.x 테스트 환경 필수) - EgovPaging: pagination undefined 처리, 페이지 버튼 렌더링, 현재 페이지 스타일, 처음/이전/다음/마지막 버튼 표시 조건, 페이지 클릭 콜백 총 7개 케이스 - EgovSelect: 옵션 렌더링, id/name 속성, defaultValue, onChange 콜백 총 4개 케이스 - EgovRadioButton: 라벨 출력, checked/unchecked 상태, 클래스 토글, onChange 콜백 총 6개 케이스
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vitest 4.x 기반 테스트 환경에서 jsdom 패키지가 devDependencies에 누락되어
기존 테스트(EgovMain.test.jsx)도 실행 불가한 상태였다. jsdom을 추가하고
공통 컴포넌트 3개에 대한 단위 테스트를 작성한다.
변경 내용
jsdom ^26.1.0devDependencies 추가 — vitest 4.x에서environment: "jsdom"사용 시 필수EgovPaging.test.jsx— 7개 케이스: pagination undefined 폴백, 페이지 버튼 렌더링, 현재 페이지cur클래스, 처음/이전/다음 버튼 조건부 표시, 페이지 클릭 콜백, 처음 버튼 콜백EgovSelect.test.jsx— 4개 케이스: 옵션 목록 렌더링, id/name 속성, defaultValue, onChange 콜백EgovRadioButton.test.jsx— 6개 케이스: 라벨 렌더링, checked/unchecked 상태,on클래스 토글, onChange 콜백테스트 결과