Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
| test("Delete all completed ToDos from the given list", () => { | ||
| const todos = createMockTodos(); | ||
| Todos.deleteCompleted(todos); | ||
| expect(todos.every((todo) => !todo.completed)).toBe(true); |
There was a problem hiding this comment.
What would this assertion report if deleteCompleted accidentally removed every task?
To "like" or "dislike" this comment, please follow this link
There was a problem hiding this comment.
right, the assertion would still pass, and the test would be a false positive. To catch over-deletion I modified the test to also check that incomplete tasks survived.
There was a problem hiding this comment.
How about when all tasks are completed or when all tasks are incomplete? Please add two more test cases. Thank you.
This comment has been minimized.
This comment has been minimized.
|
The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look. |
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The coding logic generally looks good. Just need to increase test cases coverage, and please fix #1555 (comment) . Thank you. |
Task code
CYF-1097
Changelist
Implemented a function
deletecompletedand wrote a test to verify it.