MCPcopy
hub / github.com/nowork-studio/NotFair / row

Function row

notfair-cmo/src/server/mcp/refresh.test.ts:179–196  ·  view source on GitHub ↗
(expires_at: string | null)

Source from the content-addressed store, hash-verified

177
178describe("isExpiringSoon", () => {
179 function row(expires_at: string | null): McpToken {
180 return {
181 id: "x",
182 project_slug: "acme",
183 server_name: "stripe",
184 account_label: "",
185 access_token_enc: "at",
186 refresh_token_enc: null,
187 expires_at,
188 scope: null,
189 metadata_json: null,
190 token_endpoint: null,
191 client_id: null,
192 client_secret: null,
193 created_at: new Date().toISOString(),
194 updated_at: new Date().toISOString(),
195 };
196 }
197
198 it("returns true when expires_at is in the past", () => {
199 expect(isExpiringSoon(row("2020-01-01T00:00:00.000Z"))).toBe(true);

Callers 1

refresh.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected