Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model 테스트 mockito 오류 수정 #18

Open
kimdohun0104 opened this issue Aug 24, 2020 · 0 comments
Open

model 테스트 mockito 오류 수정 #18

kimdohun0104 opened this issue Aug 24, 2020 · 0 comments
Labels
invalid This doesn't seem right

Comments

@kimdohun0104
Copy link
Member

문제 정의
model 테스트를 작성하는 과정에서 service에 when 을 사용하는 것이 아닌,
model에 직접 stubbing 해주는 모습을 확인할 수 있다.
아래는 문제가 되는 코드이다.

when(model.postUserProfile()).thenThrow(UnauthorizedException());
model.postUserProfile().catchError((err) => {
      expect(err is Navigate, true),
      expect((err as Navigate).route, '/loginMethod')
    });

앞으로 할 일

  1. 위와 같은 오류를 찾아내어 해결한다.
  2. 테스트 케이스를 점검하고 개선한다
@kimdohun0104 kimdohun0104 added the invalid This doesn't seem right label Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant