Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix(docs): unit-test.mdx to work (#27122)

kazuwombatb74ed84baeb2
diff --git a/apps/docs/content/guides/functions/unit-test.mdx b/apps/docs/content/guides/functions/unit-test.mdx
index acf1f60eb91..e08c853b2b3 100644
--- a/apps/docs/content/guides/functions/unit-test.mdx
+++ b/apps/docs/content/guides/functions/unit-test.mdx
@@ -34,13 +34,8 @@ The following script is a good example to get started with testing your Edge Fun
```typescript function-one-test.ts
// Import required libraries and modules
-import {
- assert,
- assertExists,
- assertEquals,
-} from 'https://deno.land/[email protected]/testing/asserts.ts'
+import { assert, assertEquals } from 'https://deno.land/[email protected]/testing/asserts.ts'
import { createClient, SupabaseClient } from 'https://esm.sh/@supabase/[email protected]'
-import { delay } from 'https://deno.land/x/[email protected]/mod.ts'
// Set up the configuration for the Supabase client
const supabaseUrl = Deno.env.get('SUPABASE_URL') ?? ''
@@ -147,7 +142,7 @@ To locally test and debug Edge Functions, you can utilize the Supabase CLI. Let'
4. To run the tests, use the following command in your terminal:
```bash
- deno test --allow-all supabase/functions/function-one-test.ts --env-file .env.local
+ deno test --allow-all supabase/functions/tests/function-one-test.ts --env=.env.local
```
## Resources