-
Notifications
You must be signed in to change notification settings - Fork 46
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
Team 12 과제완료 #12
base: team-12
Are you sure you want to change the base?
Team 12 과제완료 #12
Conversation
Team 12 201701981
todoItem.spec.js, todoList.spec.js 추가
}); | ||
|
||
test("5개의 할 일이 있는데, 2번, 4번만 미완료다", () => { | ||
jest.spyOn(todoItem1,"completed","get").mockReturnValue(() => true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
returnValue로 함수를 넣었기 때문에, true가 아닌 함수를 반환합니다.
함수를 반환하는 것이 아니라 true로 반환을 해주어야합니다.
수정이 필요합니다.
우연히 completed가 함수를 반환하다보니, 테스트도 통과했을 것 같네요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
알림이 안떠서 확인을 늦게 했는데 혹시 지금이라도 수정해도 될까요?
죄송합니다.
todoList.spec.js mockReturnValue 수정
localhost:3030 캡처 화면