Skip to content

Commit fe74b0a

Browse files
committed
Add test to verify no changes when no tasks are completed in deleteCompleted function
1 parent fb01341 commit fe74b0a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎Sprint-3/todo-list/todos.test.mjs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,11 @@ describe("deleteCompleted()", () => {
153153

154154
expect(todos).toEqual([]);
155155
});
156+
157+
test("Changes nothing when no task is completed", () => {
158+
const todos = [{ task: "A", completed: false }];
159+
Todos.deleteCompleted(todos);
160+
161+
expect(todos).toEqual([{ task: "A", completed: false }]);
162+
});
156163
});

0 commit comments

Comments
 (0)