chore: merge branch dev to main #195

Merged
Anri merged 18 commits from dev into main 2024-10-14 23:41:43 +02:00
Showing only changes of commit 2fcca576a6 - Show all commits

View file

@ -111,4 +111,18 @@ describe("Relative time", () => {
expect(timeDeltaToString(name)).toMatch(/1w 1d 6h|1w 1d 5h 59m 5\ds/); expect(timeDeltaToString(name)).toMatch(/1w 1d 6h|1w 1d 5h 59m 5\ds/);
}); });
} }
{
// We do +2 because we do -2 in the code to compensate for Discord's latency.
// This gives us the case where (normally) there is a 0s delay.
const name = Date.now() + 2 * 1000;
test(name.toString(), () => {
expect(timeDeltaToString(name)).toMatch(/\ds/);
});
}
{
const name = Date.now();
test(name.toString(), () => {
expect(timeDeltaToString(name)).toMatch(/\ds/);
});
}
}); });