Repository navigation
London | 26-ITP-Sep | Shirin Panahian| Sprint 3 | Build a todo-list app - #1572
shirinpanahian wants to merge 3 commits into
Conversation
| Todos.deleteCompleted(todos); | ||
| expect(todos).toHaveLength(lengthBeforeDeletion - lengthOfCompletedTask); |
There was a problem hiding this comment.
What would this length-only assertion report if deleteCompleted removed the same number of incomplete tasks instead?
To "like" or "dislike" this comment, please follow this link
There was a problem hiding this comment.
Good point! The test only checked the number of remaining todos, not whether the correct todos were deleted. I've updated the assertion to verify that completed todos are removed and incomplete todos remain.
| // In `script.js`, call `deleteCompleted()` whenever the new button is clicked. | ||
| // - ⚠️ You should not need to modify the `render()` function. |
There was a problem hiding this comment.
The page loads this module as script.mjs; how does the script.js reference in this instruction line up with the file being edited?
To "like" or "dislike" this comment, please follow this link
There was a problem hiding this comment.
Good catch! The page loads script.mjs, so I removed the incorrect script.js reference from the instructions.
|
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. |
Learners, PR Template
Self checklist
Task code
CYF-1097
Changelist
deleteCompleted()to remove all completed tasks.