Chore/Fix: 만다라트 관련된 순수 함수들 테스트 추가 & main 포지션이 없을 때 하위 포지션이 생성되지 않는 문제 해결 - #151
Merged
Merged
Conversation
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.
Chore/Fix: 만다라트 관련된 순수 함수들 테스트 추가 & main 포지션이 없을 때 하위 포지션이 생성되지 않는 문제 해결
추가된 내용 (Description)
만다라트 대시보드와 관련된 순수 함수들의 테스트를 추가했습니다. 핵심 로직과 연관되어 있어, 기능에 문제가 생기면 크리티컬한 이슈가 되기 때문에 테스트를 추가하기로 결정했습니다. 추후, 필요한 테스트를 추가할 계획입니다.
순수 함수 테스트 코드를 작성할 때, store 파일에 있는 타입들을 불러오는 과정에서 순환 참조가 발생했습니다. 테스트를 실행시킬 수 없어 store 파일에 있는 일부 타입들을 관심사별로 분리하여 해결했습니다.
또한, 테스트 코드를 작성 중에, main 포지션이 없을 시, 하위의 sub 포지션이 생성되지 않는 문제를 발견했습니다. main의 값과 동일한 포지션을 주입하여 객체를 생성하는 문제였습니다. sub 포지션을 이용해 생성하도록 코드를 변경했고, 문제를 해결했습니다.
변경 사항
왜 변경했는지 (배경/문제점):
사이드 이펙트 / 주의 사항
참고
관련 이슈 번호:
참고 문서/디자인 가이드: