-
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
Open
gihwan-kim
wants to merge
13
commits into
CNU-PC-00-2022:team-12
Choose a base branch
from
gihwan-kim:team-12
base: team-12
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Team 12 과제완료 #12
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
71fe75d
202002491
Ryu-JM cf5c581
todoItem.spec.js, todoList.spec.js 추가
loveangelina c5ed2e4
week11-과제2
gihwan-kim 6457920
Merge pull request #2 from Ryu-JM/team-12-202002491
gihwan-kim e546068
week11 과제2
gihwan-kim 6fde835
wee11 과제02
gihwan-kim 483b8ec
reslove confilct
gihwan-kim dbaade4
folder
Ryu-JM cc1a381
Merge pull request #6 from Ryu-JM/team-12-202002491
gihwan-kim 29a0e50
Merge pull request #5 from gihwan-kim/team-12-201701981
gihwan-kim 056275d
Merge pull request #3 from loveangelina/team-12-202002478
gihwan-kim 7c639d7
todoList.spec.js mockReturnValue 수정
loveangelina fcec991
Merge pull request #7 from loveangelina/team-12-202002478
gihwan-kim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import TodoItem from "../vo/TodoItem"; | ||
|
||
describe("할 일을 등록할 수 있다.", () => { | ||
test("todo item 생성하기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
expect(todoItem.task).toEqual('오늘은 술 먹는날'); | ||
}); | ||
}); | ||
|
||
describe("할 일을 업데이트 할 수 있다.", () => { | ||
test("todo item 업데이트하기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
todoItem.updateTask('오늘은 그냥 안 마실래'); | ||
expect(todoItem.task).toEqual('오늘은 그냥 안 마실래'); | ||
}); | ||
}); | ||
|
||
describe("할 일을 완료/미완료로 바꿀 수 있다.", () => { | ||
test("todo item 완료로 바꾸기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
todoItem.setComplete(); | ||
expect(todoItem.completed).toBeTruthy(); | ||
}); | ||
test("todo item 미완료로 바꾸기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
todoItem.unsetComplete(); | ||
expect(todoItem.completed).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일을 완료/미완료로 생성할 수 있다.", () => { | ||
test("todo item 완료로 만들기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', new Date(), true); | ||
expect(todoItem.completed).toBeTruthy(); | ||
}); | ||
test("todo item 미완료로 생성하기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', new Date(), false); | ||
expect(todoItem.completed).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일에 날짜가 들어간다.", () => { | ||
test("todo item이 오늘 생성 => equalsDayOfCreatedAt : true", () => { | ||
const sourceDate = new Date(); | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', sourceDate); | ||
const targetDate = new Date(); | ||
expect(todoItem.equalsDayOfCreatedAt(targetDate)).toBeTruthy(); | ||
}); | ||
|
||
test("todo item을 어제 생성 => equalsDayOfCreatedAt : false", () => { | ||
const sourceDate = new Date('2022-05-08T10:10:10;'); | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', sourceDate); | ||
const targetDate = new Date('2022-05-09T10:10:10'); | ||
expect(todoItem.equalsDayOfCreatedAt(targetDate)).toBeFalsy(); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
import TodoItem from "../vo/TodoItem"; | ||
import TodoList from "../vo/TodoList"; | ||
|
||
let todoItem1, todoItem2, todoItem3, todoItem4, todoItem5; | ||
let todoList; | ||
|
||
// 테스트 용 리스트 생성 | ||
beforeEach(() => { | ||
todoItem1 = new TodoItem(1, '할 일 1', new Date()); | ||
todoItem2 = new TodoItem(2, '할 일 2', new Date()); | ||
todoItem3 = new TodoItem(3, '할 일 3', new Date()); | ||
todoItem4 = new TodoItem(4, '할 일 4', new Date()); | ||
todoItem5 = new TodoItem(5, '할 일 5', new Date()); | ||
const todoItemList = [todoItem1, todoItem2, todoItem3, todoItem4, todoItem5] | ||
todoList = new TodoList(todoItemList, new Date()); | ||
}); | ||
|
||
describe("할 일 목록을 가지고 있다.", () => { | ||
test("5개를 만들면, 5개가 있다.", () => { | ||
expect(todoList.items).toHaveLength(5); | ||
}); | ||
}); | ||
|
||
describe("할 일 목록에서 삭제를 할 수 있다.", () => { | ||
test("5개의 할 일이 있는데, id가 3인 할 일을 삭제할 수 있다.", () => { | ||
todoList.removeTodoItem(3); | ||
expect(todoList.items).toHaveLength(4); | ||
expect(todoList.items.some((todoItem) => todoItem.id === 3)).toBeFalsy; | ||
}); | ||
|
||
test("존재하지 않는 id를 입력하면 삭제하지 않는다.", () => { | ||
todoList.removeTodoItem(10); // 존재하지 않는 id | ||
expect(todoList.items).toHaveLength(5); | ||
}); | ||
}); | ||
|
||
describe("할 일 목록에서 할 일을 추가할 수 있다.", () => { | ||
test("5개의 할 일이 있을 때, id가 6인 할 일을 추가할 수 있다.", () => { | ||
const todoItem6 = new TodoItem(6, '할 일 6', new Date()); | ||
|
||
todoList.pushTodoItem(todoItem6); | ||
|
||
expect(todoList.items).toHaveLength(6); | ||
expect(todoList.items.some((todoItem) => todoItem.id === 6)).toBeTruthy; | ||
}); | ||
}); | ||
|
||
describe("생성한 할 일들 중에서 오늘 할 일, 지난 할 일 구분하기", () => { | ||
test("5개의 할 일이 있는데, 2번 빼고 오늘 만들 일이다.", () => { | ||
// todoItem2 : equalsDayOfCreatedAt 메서드가 false 를 return 하게됨 | ||
// equalsDayItems의 filter에서 equalsDayOfCreatedAt 메서드를 사용하는 것을 알고 있다면 | ||
// 아래와 같이 코드를 작성해 수정해줄 수 있다. | ||
jest.spyOn(todoItem2, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
|
||
expect(todoList.equalsDayItems).toHaveLength(4); | ||
expect(todoList.equalsDayItems.some((todoItem) => todoItem.id === 2)).toBeFalsy; | ||
}); | ||
test("5개의 할 일이 있는데, id 2번만 지난 할 일이다.", () => { | ||
jest.spyOn(todoItem2, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
|
||
expect(todoList.notEqualsDayItems).toHaveLength(1); | ||
expect(todoList.notEqualsDayItems.some((todoItem) => todoItem.id === 2)).toBeTruthy; | ||
}); | ||
}); | ||
|
||
describe("오늘 할 일 중 완료/미완료 구분하기", () => { | ||
test("5개의 할 일이 있는데, 2번, 3번만 완료다.", () => { | ||
jest.spyOn(todoItem2, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem3, "completed", "get").mockReturnValue(true); | ||
expect(todoList.equalsDayAndCompletedItems).toHaveLength(2); | ||
expect(todoList.equalsDayAndCompletedItems.some((todoItem) => todoItem.id === 2)).toBeTruthy; | ||
expect(todoList.equalsDayAndCompletedItems.some((todoItem) => todoItem.id === 3)).toBeTruthy; | ||
}); | ||
test("5개의 할 일이 있는데, 4번만 미완료다", () => { | ||
jest.spyOn(todoItem1, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem2, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem3, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem5, "completed", "get").mockReturnValue(true); | ||
expect(todoList.equalsDayAndNotCompletedItems).toHaveLength(1); | ||
expect(todoList.equalsDayAndNotCompletedItems.some((todoItem) => todoItem.id === 4)).toBeTruthy; | ||
}); | ||
}); | ||
|
||
// todo | ||
|
||
describe("지난 할 일 중 완료/미완료 구분하기", () => { | ||
test("5개의 지난 할 일이 있는데, 2번, 3번만 완료다.", () => { | ||
// 지난 할 일 | ||
jest.spyOn(todoItem1, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem2, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem3, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem4, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem5, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
|
||
// 완료 | ||
// 2, 3 번만 완료로. | ||
jest.spyOn(todoItem2, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem3, "completed", "get").mockReturnValue(true); | ||
|
||
expect(todoList.notEqualsDayAndCompletedItems).toHaveLength(2); | ||
expect(todoList.notEqualsDayAndCompletedItems.some((todoItem) => todoItem.id === 2)).toBeTruthy; | ||
expect(todoList.notEqualsDayAndCompletedItems.some((todoItem) => todoItem.id === 3)).toBeTruthy; | ||
}); | ||
test("5개의 지난 할 일이 있는데, 2번, 4번만 미완료다", () => { | ||
// 지난 할 일 | ||
jest.spyOn(todoItem1, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem2, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem3, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem4, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem5, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
|
||
// 완료! | ||
// 2, 4 번 빼고 나머지를 완료로. | ||
jest.spyOn(todoItem1, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem3, "completed", "get").mockReturnValue(true); | ||
jest.spyOn(todoItem5, "completed", "get").mockReturnValue(true); | ||
expect(todoList.notEqualsDayAndNotCompletedItems).toHaveLength(2); | ||
expect(todoList.notEqualsDayAndNotCompletedItems.some((todoItem) => todoItem.id === 2)).toBeTruthy; | ||
expect(todoList.notEqualsDayAndNotCompletedItems.some((todoItem) => todoItem.id === 4)).toBeTruthy; | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import TodoItem from "../../vo/TodoItem"; | ||
|
||
describe("할 일을 만들 수 있다", () => { | ||
test("todo Item 생성하기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
expect(todoItem.task).toEqual('오늘은 술 먹는날'); | ||
}); | ||
}); | ||
|
||
describe("할 일을 업데이트 할 수 있다", () => { | ||
test("todo Item 업데이트 하기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
todoItem.updateTask('오늘은 그냥 안마실래') | ||
expect(todoItem.task).toEqual('오늘은 그냥 안마실래'); | ||
}); | ||
}); | ||
|
||
describe("할 일을 완료/미완료로 바꿀 수 있다", () => { | ||
test("todo Item 완료로 바꾸기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
todoItem.setComplete(); | ||
expect(todoItem.completed).toBeTruthy(); | ||
}); | ||
test("todo Item 미완료로 바꾸기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날'); | ||
todoItem.unsetComplete(); | ||
expect(todoItem.completed).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일에 날짜가 들어간다", () => { | ||
test("todo Item이 오늘 만들었으면 isToday가 true이다", () => { | ||
const sourceDate = new Date(); | ||
const targetDate = new Date(); | ||
|
||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', sourceDate); | ||
expect(todoItem.equalsDayOfCreatedAt(targetDate)).toBeTruthy(); | ||
}); | ||
test("todo Item이 어제 만들었으면 isToday가 false이다", () => { | ||
const sourceDate = new Date('2022-05-08T10:00:00'); | ||
const targetDate = new Date('2022-05-09T10:00:00'); | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', sourceDate); | ||
expect(todoItem.equalsDayOfCreatedAt(targetDate)).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일을 완료로 생성할 수 있다", () => { | ||
test("todo Item 완료로 만들기", () => { | ||
const todoItem = new TodoItem(1, '오늘은 술 먹는날', new Date(), true); | ||
expect(todoItem.completed).toBeTruthy(); | ||
}); | ||
}); | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
import TodoItem from "../../vo/TodoItem"; | ||
import TodoList from "../../vo/TodoList"; | ||
|
||
let todoItem1, todoItem2, todoItem3, todoItem4, todoItem5; | ||
let todoList; | ||
|
||
beforeEach(() => { | ||
todoItem1 = new TodoItem(1, '할 일 1', new Date()); | ||
todoItem2 = new TodoItem(2, '할 일 2', new Date()); | ||
todoItem3 = new TodoItem(3, '할 일 3', new Date()); | ||
todoItem4 = new TodoItem(4, '할 일 4', new Date()); | ||
todoItem5 = new TodoItem(5, '할 일 5', new Date()); | ||
const todoItemList = [todoItem1, todoItem2, todoItem3, todoItem4, todoItem5] | ||
todoList = new TodoList(todoItemList, new Date()); | ||
}); | ||
|
||
describe("할 일 목록을 가지고 있다", () => { | ||
test("5개를 만들면 5개가 있다", () => { | ||
|
||
expect(todoList.items).toHaveLength(5); | ||
}); | ||
}); | ||
|
||
describe("할 일 목록에서 삭제할 수 있다", () => { | ||
test("5개의 할 일이 있는데 id가 3인 파일을 삭제할 수 있다", () => { | ||
|
||
todoList.removeTodoItem(3); | ||
expect(todoList.items).toHaveLength(4); | ||
expect(todoList.items.some((todoItem) => todoItem.id === 3)).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일 목록에서 할 일을 추가할 수 있다", () => { | ||
test("5개의 할 일에서 id가 6인 할일을 추가할 수 있다", () => { | ||
|
||
|
||
const todoItem6 = new TodoItem(6, '할 일 6', new Date()); | ||
|
||
todoList.pushTodoItem(todoItem6); | ||
|
||
expect(todoList.items).toHaveLength(6); | ||
expect(todoList.items.some((todoItem) => todoItem.id === 6)).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
describe("생성한 한 일들 중에서 오늘 할 일, 지난 할 일 구분하기", () => { | ||
test("5개의 할 일이 있는데, 2번 빼고 오늘 만들 일이다.", () => { | ||
|
||
|
||
jest.spyOn(todoItem2, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
|
||
expect(todoList.equalsDayItems).toHaveLength(4); | ||
expect(todoList.equalsDayItems.some((todoItem) => todoItem.id === 2)).toBeFalsy(); | ||
}); | ||
|
||
test("5개의 할 일이 있는데, id 2번만 지난 할 일이다.", () => { | ||
|
||
jest.spyOn(todoItem2, "equalsDayOfCreatedAt").mockImplementation(() => false); | ||
|
||
expect(todoList.notEqualsDayItems).toHaveLength(1); | ||
expect(todoList.notEqualsDayItems.some((todoItem) => todoItem.id === 2)).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
describe("오늘 할 일 중 완료/미완료 구분하기", () => { | ||
test("5개의 할 일이 있는데, 2번, 3번만 완료다", () => { | ||
jest.spyOn(todoItem2, "completed", "get").mockReturnValue(() => true); | ||
jest.spyOn(todoItem3, "completed", "get").mockReturnValue(() => true); | ||
expect(todoList.equalsDayAndCompletedItems).toHaveLength(2); | ||
}); | ||
|
||
test("5개의 할 일이 있는데, 2번, 4번만 미완료다", () => { | ||
jest.spyOn(todoItem1,"completed","get").mockReturnValue(() => true); | ||
jest.spyOn(todoItem3,"completed","get").mockReturnValue(() => true); | ||
jest.spyOn(todoItem5,"completed","get").mockReturnValue(() => true); | ||
|
||
expect(todoList.equalsDayAndNotCompletedItems).toHaveLength(2); | ||
}); | ||
}); | ||
|
||
describe("지난 할 일 중 완료/미완료 구분하기", () => { | ||
test("5개의 지난 할 일이 있는데, 2번, 3번만 완료이다.", () => { | ||
jest.spyOn(todoItem1,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem2,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem3,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem4,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem5,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem2,"completed","get").mockReturnValue(() => true); | ||
jest.spyOn(todoItem3,"completed","get").mockReturnValue(() => true); | ||
|
||
expect(todoList.notEqualsDayAndCompletedItems).toHaveLength(2); | ||
}); | ||
test("5개의 지난 할 일이 있는데, 2번, 4번만 미완료이다.", () => { | ||
jest.spyOn(todoItem1,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem2,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem3,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem4,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem5,"equalsDayOfCreatedAt").mockImplementation(() => false); | ||
jest.spyOn(todoItem1,"completed","get").mockReturnValue(() => true); | ||
jest.spyOn(todoItem3,"completed","get").mockReturnValue(() => true); | ||
jest.spyOn(todoItem5,"completed","get").mockReturnValue(() => true); | ||
|
||
expect(todoList.notEqualsDayAndNotCompletedItems).toHaveLength(2); | ||
}); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import TodoItem from "../../vo/TodoItem"; | ||
|
||
describe("할 일을 만들 수 있다.", () => { | ||
test("todo item 생성하기", () => { | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날"); | ||
|
||
expect(todoItem.task).toEqual("오늘은 술 먹는날"); | ||
}); | ||
}); | ||
|
||
describe("할 일을 업데이트 할 수 있다.", () => { | ||
test("todo item 업데이트 하기", () => { | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날"); | ||
todoItem.updateTask("오늘은 그냥 안 마실래"); | ||
expect(todoItem.task).toEqual("오늘은 그냥 안 마실래"); | ||
}); | ||
}); | ||
|
||
describe("할 일을 완료로 바꿀 수 있다.", () => { | ||
test("todo item 완료로 바꾸기", () => { | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날"); | ||
todoItem.setComplete(); | ||
expect(todoItem.completed).toBeTruthy(); | ||
}); | ||
test("todo item 미완료로 바꾸기", () => { | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날"); | ||
todoItem.unsetComplete(); | ||
expect(todoItem.completed).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일에 날짜가 들어간다.", () => { | ||
test("todo item이 오늘 만들었으면, isToday가 true이다.", () => { | ||
const sourceDate = new Date(new Date()); | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날", sourceDate); | ||
const targetDate = new Date(new Date()); | ||
expect(todoItem.equalsDayOfCreatedAt(targetDate)).toBeTruthy(); | ||
}); | ||
test("todo item이 어제 만들었으면, isToday가 false이다.", () => { | ||
const sourceDate = new Date('2022-05-08T10:00:00'); | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날", sourceDate); | ||
const targetDate = new Date('2022-05-09T10:00:00'); | ||
expect(todoItem.equalsDayOfCreatedAt(targetDate)).toBeFalsy(); | ||
}); | ||
}); | ||
|
||
describe("할 일을 완료로 생성할 수 수 있다.", () => { | ||
test("todo item 완료로 만들기", () => { | ||
const todoItem = new TodoItem(1, "오늘은 술 먹는날", new Date(), true); | ||
expect(todoItem.completed).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.
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.
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.
알림이 안떠서 확인을 늦게 했는데 혹시 지금이라도 수정해도 될까요?
죄송합니다.