The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
test: run supabase locally during test (#35947)
Charisbf3bada7fd74
diff --git a/.github/workflows/docs-tests.yml b/.github/workflows/docs-tests.ymlindex 714df8489ec..dc029e56c5b 100644--- a/.github/workflows/docs-tests.yml+++ b/.github/workflows/docs-tests.yml@@ -25,6 +25,7 @@ jobs:apps/docsexamplespackages+ supabase- uses: pnpm/action-setup@v4name: Install pnpmdiff --git a/apps/docs/app/api/graphql/tests/searchDocs.test.ts b/apps/docs/app/api/graphql/tests/searchDocs.test.tsindex 1d9d3c3d03c..3788f58697d 100644--- a/apps/docs/app/api/graphql/tests/searchDocs.test.ts+++ b/apps/docs/app/api/graphql/tests/searchDocs.test.ts@@ -1,4 +1,4 @@-import { afterAll, describe, expect, it, vi } from 'vitest'+import { afterAll, beforeAll, describe, expect, it, vi } from 'vitest'import { Result } from '~/features/helpers.fn'import { type OpenAIClientInterface } from '~/lib/openAi'import { ApiError } from '../../utils'@@ -45,7 +45,12 @@ vi.mock('~/lib/supabase', () => ({}))describe('/api/graphql searchDocs', () => {+ beforeAll(() => {+ vi.spyOn(console, 'error').mockImplementation(() => {})+ })+afterAll(() => {+ vi.restoreAllMocks()vi.doUnmock('~/lib/openAi')vi.doUnmock('~/lib/supabase')})diff --git a/apps/docs/package.json b/apps/docs/package.jsonindex 36753e57541..4215dcb5c99 100644--- a/apps/docs/package.json+++ b/apps/docs/package.json@@ -20,7 +20,8 @@"pretypecheck": "pnpm run codegen:graphql","typecheck": "tsc --noEmit","pretest": "pnpm run codegen:examples",- "test": "vitest --exclude \"**/*.smoke.test.ts\"",+ "test": "pnpm supabase start && pnpm run test:local && pnpm supabase stop",+ "test:local": "vitest --exclude \"**/*.smoke.test.ts\"","test:smoke": "pnpm run codegen:references && vitest -t \"prod smoke test\"","embeddings": "tsx scripts/search/generate-embeddings.ts","embeddings:refresh": "pnpm run embeddings --refresh",