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.
작업 내용
create()
,get()
,getFromUserDefaults()
,delete()
테스트 완료시연 방법
기타 (고민과 해결, 리뷰 포인트 등)
getFromUserDefaults나 delete의 경우 시행하기 전에 미리 만들어져있는 데이터가 필요하다.
하지만 생성하는 시점과 조회하는 시점이 차이가 있을경우 테스트가 제대로 작동하지 않는다.
따라서 expectation을 통해 시점을 조정하도록 코드를 짰음
[ + ] 추가로
guard let result = resultOpt else { return }
이런식으로 작성되어있는 옵셔널 언래핑이 있는데,github action이 같은 이름으로 언래핑하는 것을 막는 바람에 다음과 같은 구문이 불가능했다.
guard let result = result else { return }