WIP: form attachments tests

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-13 16:24:27 +01:00
co-authored by Claude Fable 5.2
parent 6003b3d7d7
commit 02b1e96d3d
5 changed files with 1025 additions and 2 deletions
+3
View File
@@ -91,6 +91,9 @@ function readGraphEnv(): GraphEnv | null {
*/
const tokenCache = new Map<string, { expiresAt: number; token: string }>()
/** Forgets cached Graph tokens (after rotating the client secret in a running process; tests). */
export const clearGraphTokenCache = (): void => tokenCache.clear()
async function getAccessToken(env: GraphEnv, fetchImpl: typeof fetch = fetch): Promise<string> {
const cacheKey = `${env.tenantId}:${env.clientId}`
const cached = tokenCache.get(cacheKey)