This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
import { isProjectIdle } from "../lib/cleanup";
|
||||
|
||||
test("marks only projects beyond the configured idle window", () => {
|
||||
const now = Date.parse("2026-09-17T12:00:00.000Z");
|
||||
assert.equal(isProjectIdle("2026-09-16T11:59:59.000Z", 24, now), true);
|
||||
assert.equal(isProjectIdle("2026-09-16T12:00:01.000Z", 24, now), false);
|
||||
assert.equal(isProjectIdle("not-a-date", 24, now), false);
|
||||
});
|
||||
Reference in New Issue
Block a user