Skip to content

Commit c1b510f

Browse files
committed
Add test for daysLeft function to verify past date calculation
1 parent c302acb commit c1b510f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ describe("daysLeft()", () => {
171171
test("Today", () => {
172172
expect(Todos.daysLeft("2026-11-12", today)).toBe(0);
173173
});
174+
test("Past date is negative", () => {
175+
expect(Todos.daysLeft("2026-11-10", today)).toBe(-2);
176+
});
174177
});
175178

176179
describe("addTask() with deadline", () => {

0 commit comments

Comments
 (0)