"Leaks detected" when running "deno test" with Supabase Edge Functions
12:27 20 Jan 2026

I'm executing deno test --allow-all . --env-file=../../../.env --trace-leaks and I get the following error:

error: Leaks detected:
  - A timer was started before the test, but completed during the test. Intervals and timers should not complete in a test if they were not started in that test. This is often caused by not calling `clearTimeout`. The operation was started here:
    at Object.queueUserTimer (ext:core/01_core.js:836:9)
    at setTimeout (ext:deno_web/02_timers.js:48:15)
    at Timeout. (ext:deno_node/internal/timers.mjs:95:7)
    at new Timeout (ext:deno_node/internal/timers.mjs:76:37)
    at setTimeout (node:timers:16:10)
    at SupabaseAuthClient._startAutoRefresh (file:///home/runner/.cache/deno/npm/registry.npmjs.org/@supabase/auth-js/2.91.0/dist/main/GoTrueClient.js:2128:25)
    at async SupabaseAuthClient.startAutoRefresh (file:///home/runner/.cache/deno/npm/registry.npmjs.org/@supabase/auth-js/2.91.0/dist/main/GoTrueClient.js:2183:9)

My test:

import { supabaseAdminClient } from '../_shared/supabase.ts';

Deno.test('Hello World', async () => {
  console.log("Hello World")
});

My Deno version:

deno --version
deno 2.6.5 (stable, release, x86_64-apple-darwin)
v8 14.2.231.17-rusty
typescript 5.9.2
typescript testing supabase deno supabase-js