Skip to content

Commit b088ca0

Browse files
committed
Add tests for daysLeft function to verify future date calculation
1 parent 0e9a900 commit b088ca0

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
@@ -161,3 +161,11 @@ describe("deleteCompleted()", () => {
161161
expect(todos).toEqual([{ task: "A", completed: false }]);
162162
});
163163
});
164+
165+
describe("daysLeft()", () => {
166+
const today = new Date(2026, 10, 12);
167+
168+
test("Future date", () => {
169+
expect(Todos.daysLeft("2026-11-15", today)).toBe(3);
170+
});
171+
});

0 commit comments

Comments
 (0)