Skip to content

Commit 066ae04

Browse files
committed
Add test for addTask() to verify deadline storage functionality
1 parent b088ca0 commit 066ae04

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,11 @@ describe("daysLeft()", () => {
169169
expect(Todos.daysLeft("2026-11-15", today)).toBe(3);
170170
});
171171
});
172+
173+
describe("addTask() with deadline", () => {
174+
test("Stores the deadline when given", () => {
175+
const todos = [];
176+
Todos.addTask(todos, "Wash car", false, "2026-12-01");
177+
expect(todos[0].deadline).toBe("2026-12-01");
178+
});
179+
});

0 commit comments

Comments
 (0)