We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8325547 commit 543383dCopy full SHA for 543383d
tests/expiry-calc.test.ts
@@ -0,0 +1,17 @@
1
+import { describe, expect, test } from "bun:test";
2
+
3
+describe("Expiry calculation", () => {
4
+ test("24 hours in seconds", () => {
5
+ expect(24 * 3600).toBe(86400);
6
+ });
7
8
+ test("7 days in seconds", () => {
9
+ expect(7 * 24 * 3600).toBe(604800);
10
11
12
+ test("expiry timestamp is in the future", () => {
13
+ const now = Math.floor(Date.now() / 1000);
14
+ const expiry = now + 24 * 3600;
15
+ expect(expiry).toBeGreaterThan(now);
16
17
+});
0 commit comments