Skip to content

Commit 5defa00

Browse files
authored
Fix API key test date (#727)
1 parent 115f5ac commit 5defa00

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

test/api-keys.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ describe("API Key System", () => {
9595

9696
describe("Request Validation", () => {
9797
it("should validate valid create request", () => {
98+
// Use a date that's guaranteed to be in the future
99+
const futureDate = new Date(Date.now() + 86400000).toISOString(); // 1 day from now
98100
const validRequest = {
99101
scopes: [Scope.RuntExecute],
100-
expiresAt: "2025-12-31T23:59:59Z",
102+
expiresAt: futureDate,
101103
userGenerated: true,
102104
name: "Test Key",
103105
};
@@ -176,9 +178,11 @@ describe("API Key System", () => {
176178
});
177179

178180
it("should accept request with optional resources", () => {
181+
// Use a date that's guaranteed to be in the future
182+
const futureDate = new Date(Date.now() + 86400000).toISOString(); // 1 day from now
179183
const validRequest = {
180184
scopes: [Scope.RuntExecute],
181-
expiresAt: "2025-12-31T23:59:59Z",
185+
expiresAt: futureDate,
182186
userGenerated: true,
183187
resources: [{ id: "notebook-123", type: "notebook" }],
184188
};

0 commit comments

Comments
 (0)