From 63ced2ea523dd9686e20ce618447fef5f11c588d Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 14:37:24 -0600 Subject: [PATCH 1/8] fix(e2e): filter OAuth cleanup by test run --- .changeset/quiet-owls-filter.md | 5 + integration/cleanup/__tests__/cleanup.test.ts | 110 ++++++++++++++++++ integration/cleanup/cleanup.setup.ts | 6 +- .../__tests__/OAuthApplicationsApi.test.ts | 27 +++++ .../src/api/endpoints/OAuthApplicationsApi.ts | 1 + 5 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 .changeset/quiet-owls-filter.md create mode 100644 integration/cleanup/__tests__/cleanup.test.ts diff --git a/.changeset/quiet-owls-filter.md b/.changeset/quiet-owls-filter.md new file mode 100644 index 00000000000..00746a573ab --- /dev/null +++ b/.changeset/quiet-owls-filter.md @@ -0,0 +1,5 @@ +--- +'@clerk/backend': patch +--- + +Allow filtering OAuth applications by name with the optional `nameQuery` parameter on `oauthApplications.list()`. diff --git a/integration/cleanup/__tests__/cleanup.test.ts b/integration/cleanup/__tests__/cleanup.test.ts new file mode 100644 index 00000000000..b523936297a --- /dev/null +++ b/integration/cleanup/__tests__/cleanup.test.ts @@ -0,0 +1,110 @@ +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; + +import { getE2EApplicationRunMarker } from '../../testUtils/e2eRun'; + +const { registerCleanup } = vi.hoisted(() => ({ + registerCleanup: vi.fn<(_name: string, cleanup: () => Promise) => void>(), +})); + +vi.mock('@playwright/test', () => ({ test: registerCleanup })); + +describe('OAuth application cleanup', () => { + beforeEach(() => { + vi.resetModules(); + registerCleanup.mockClear(); + vi.stubEnv('INTEGRATION_TEST_RUN_KEY', 'cleanup-regression'); + vi.stubEnv( + 'INTEGRATION_INSTANCE_KEYS', + JSON.stringify({ + 'oauth-provider': { + pk: `pk_test_${Buffer.from('cleanup.clerk.accounts.dev$').toString('base64')}`, + sk: 'sk_test_cleanup', + }, + }), + ); + vi.stubEnv('INTEGRATION_STAGING_INSTANCE_KEYS', '{}'); + vi.stubEnv('CLERK_PLATFORM_API_KEY', ''); + vi.spyOn(console, 'log').mockImplementation(() => {}); + vi.spyOn(console, 'warn').mockImplementation(() => {}); + }); + + afterEach(() => { + vi.unstubAllEnvs(); + vi.unstubAllGlobals(); + vi.restoreAllMocks(); + }); + + it.each([false, true])('filters every page and preserves other runs (rate limited: %s)', async rateLimited => { + const marker = getE2EApplicationRunMarker('cleanup-regression'); + const listQueries: Record[] = []; + const deletedIds: string[] = []; + let shouldRateLimit = rateLimited; + + vi.stubGlobal( + 'fetch', + vi.fn((input, init) => { + const request = new Request(input, init); + const url = new URL(request.url); + + if (request.method === 'GET' && url.pathname === '/v1/users') { + return Promise.resolve(Response.json([])); + } + if (request.method === 'GET' && url.pathname === '/v1/users/count') { + return Promise.resolve(Response.json({ total_count: 0 })); + } + if (request.method === 'GET' && url.pathname === '/v1/oauth_applications') { + listQueries.push(Object.fromEntries(url.searchParams)); + if (shouldRateLimit) { + shouldRateLimit = false; + return Promise.resolve( + Response.json( + { errors: [{ code: 'too_many_requests', message: 'Too many requests' }] }, + { + status: 429, + headers: { 'Retry-After': '0' }, + }, + ), + ); + } + + const data = + Number(url.searchParams.get('offset') || 0) === 0 + ? [ + { object: 'oauth_application', id: 'oauthapp_first', name: `e2e-email-${marker}` }, + ...Array.from({ length: 99 }, (_, index) => ({ + object: 'oauth_application', + id: `oauthapp_other_${index}`, + name: `e2e-email-${marker}-other-run`, + })), + ] + : [{ object: 'oauth_application', id: 'oauthapp_second', name: `e2e-other-config-${marker}` }]; + return Promise.resolve(Response.json({ data, total_count: 101 })); + } + if (request.method === 'DELETE' && url.pathname.startsWith('/v1/oauth_applications/')) { + const id = url.pathname.split('/').pop(); + if (id) { + deletedIds.push(id); + } + return Promise.resolve(Response.json({ object: 'oauth_application', id, deleted: true })); + } + + throw new Error(`Unexpected request: ${request.method} ${url}`); + }), + ); + + await import('../cleanup.setup'); + const cleanup = registerCleanup.mock.calls[0]?.[1]; + expect(cleanup).toBeTypeOf('function'); + if (!cleanup) { + throw new Error('Cleanup was not registered'); + } + await cleanup(); + + expect(listQueries).toEqual([ + { name_query: marker, limit: '100' }, + ...(rateLimited ? [{ name_query: marker, limit: '100' }] : []), + { name_query: marker, limit: '100', offset: '100' }, + ]); + expect(deletedIds).toEqual(['oauthapp_first', 'oauthapp_second']); + }); +}); diff --git a/integration/cleanup/cleanup.setup.ts b/integration/cleanup/cleanup.setup.ts index ff2c330d8b1..db045cba33b 100644 --- a/integration/cleanup/cleanup.setup.ts +++ b/integration/cleanup/cleanup.setup.ts @@ -178,7 +178,11 @@ setup('cleanup instances ', async () => { const applicationsToDelete: Array<{ id: string; name: string }> = []; while (true) { - const { data, totalCount } = await clerkClient.oauthApplications.list({ limit, offset }); + const { data, totalCount } = await clerkClient.oauthApplications.list({ + nameQuery: applicationRunMarker, + limit, + offset, + }); applicationsToDelete.push(...data.filter(application => application.name.endsWith(applicationRunMarker))); offset += data.length; diff --git a/packages/backend/src/api/__tests__/OAuthApplicationsApi.test.ts b/packages/backend/src/api/__tests__/OAuthApplicationsApi.test.ts index bd2a5c997b4..14afa71e0ec 100644 --- a/packages/backend/src/api/__tests__/OAuthApplicationsApi.test.ts +++ b/packages/backend/src/api/__tests__/OAuthApplicationsApi.test.ts @@ -7,6 +7,33 @@ import { createBackendApiClient } from '../factory'; describe('OAuthApplications', () => { const oauthApplicationId = 'oauthapp_xxxxx'; + describe('list', () => { + it('forwards the name filter alongside pagination', async () => { + const apiClient = createBackendApiClient({ + apiUrl: 'https://api.clerk.test', + secretKey: 'sk_xxxxx', + }); + + server.use( + http.get( + 'https://api.clerk.test/v1/oauth_applications', + validateHeaders(({ request }) => { + expect(Object.fromEntries(new URL(request.url).searchParams)).toEqual({ + name_query: 'run-example', + limit: '100', + offset: '100', + }); + return HttpResponse.json({ data: [], total_count: 100 }); + }), + ), + ); + + const response = await apiClient.oauthApplications.list({ nameQuery: 'run-example', limit: 100, offset: 100 }); + + expect(response).toEqual({ data: [], totalCount: 100 }); + }); + }); + describe('revokeToken', () => { it('revokes an OAuth application token', async () => { const apiClient = createBackendApiClient({ diff --git a/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts b/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts index 5504e89250a..6821540be29 100644 --- a/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts +++ b/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts @@ -39,6 +39,7 @@ export type RevokeOAuthApplicationTokenParams = { /** @generateWithEmptyComment */ export type GetOAuthApplicationListParams = ClerkPaginationRequest<{ + nameQuery?: string; /** * Returns OAuth applications in a particular order. Prefix a value with `+` to sort in ascending order, or `-` to sort in descending order. Defaults to `-created_at`. */ From fb16062e7ae5bef73086f7c7db2c2ddb6738a389 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 14:43:14 -0600 Subject: [PATCH 2/8] chore: use an empty changeset for cleanup fix --- .changeset/quiet-owls-filter.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/.changeset/quiet-owls-filter.md b/.changeset/quiet-owls-filter.md index 00746a573ab..a845151cc84 100644 --- a/.changeset/quiet-owls-filter.md +++ b/.changeset/quiet-owls-filter.md @@ -1,5 +1,2 @@ --- -'@clerk/backend': patch --- - -Allow filtering OAuth applications by name with the optional `nameQuery` parameter on `oauthApplications.list()`. From 280d5865193c7901b3feba40937f673332f276c6 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 14:54:21 -0600 Subject: [PATCH 3/8] test(tanstack-react-start): align missing-key guidance assertions --- integration/tests/tanstack-start/keyless.test.ts | 1 + .../src/server/__tests__/loadOptions.test.ts | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/integration/tests/tanstack-start/keyless.test.ts b/integration/tests/tanstack-start/keyless.test.ts index 4427a4a1c6a..009cd71833e 100644 --- a/integration/tests/tanstack-start/keyless.test.ts +++ b/integration/tests/tanstack-start/keyless.test.ts @@ -36,5 +36,6 @@ test.describe('Keyless mode @tanstack-react-start', () => { expect(response?.status()).toBe(500); expect(app.devOutput).toContain('Missing secretKey'); expect(app.devOutput).toContain('npx clerk@latest link'); + expect(app.devOutput).toContain('npx clerk@latest env pull'); }); }); diff --git a/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts b/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts index bcd979fe440..8ea3f6b9c9d 100644 --- a/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts +++ b/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts @@ -12,6 +12,8 @@ describe('loadOptions', () => { ['only the secret key is missing', { publishableKey: 'pk_test_Zm9vLWJhci0xMi5jbGVyay5hY2NvdW50cy5kZXYk' }], ['both keys are missing', {}], ])('throws the CLI-pointing error when %s', (_, overrides) => { - expect(() => loadOptions(request, overrides)).toThrow(/Missing secretKey[\s\S]*npx clerk@latest link/); + expect(() => loadOptions(request, overrides)).toThrow( + /Missing secretKey[\s\S]*npx clerk@latest link[\s\S]*npx clerk@latest env pull/, + ); }); }); From b23d4532dd53fda3b50d65b7b3afb2f3a067f32a Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 15:51:51 -0600 Subject: [PATCH 4/8] test(ci): run integration infrastructure regression tests --- .github/workflows/ci.yml | 3 +++ integration/cleanup/__tests__/cleanup.test.ts | 2 +- package.json | 1 + packages/backend/src/api/endpoints/OAuthApplicationsApi.ts | 3 +++ 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9b46942601..edb5cc0d9bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -294,6 +294,9 @@ jobs: turbo-team: ${{ vars.TURBO_TEAM }} turbo-token: ${{ secrets.TURBO_TOKEN }} + - name: Run integration infrastructure unit tests + run: pnpm test:integration:unit + - name: Run tests in packages run: | if [ "${{ matrix.test-filter }}" = "**" ]; then diff --git a/integration/cleanup/__tests__/cleanup.test.ts b/integration/cleanup/__tests__/cleanup.test.ts index b523936297a..c139f19f31c 100644 --- a/integration/cleanup/__tests__/cleanup.test.ts +++ b/integration/cleanup/__tests__/cleanup.test.ts @@ -34,7 +34,7 @@ describe('OAuth application cleanup', () => { vi.restoreAllMocks(); }); - it.each([false, true])('filters every page and preserves other runs (rate limited: %s)', async rateLimited => { + it.each([false, true])('filters every page and rejects suffix nonmatches (rate limited: %s)', async rateLimited => { const marker = getE2EApplicationRunMarker('cleanup-regression'); const listQueries: Record[] = []; const deletedIds: string[] = []; diff --git a/package.json b/package.json index 5884e61374c..3bfca2c6aa9 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "test:integration:sessions": "DISABLE_WEB_SECURITY=true E2E_SESSIONS_APP_1_ENV_KEY=sessions-prod-1 E2E_SESSIONS_APP_2_ENV_KEY=sessions-prod-2 E2E_SESSIONS_APP_1_HOST=multiple-apps-e2e.clerk.app pnpm test:integration:base --grep @sessions", "test:integration:sessions:staging": "DISABLE_WEB_SECURITY=true E2E_SESSIONS_APP_1_ENV_KEY=clerkstage-sessions-prod-1 E2E_SESSIONS_APP_2_ENV_KEY=clerkstage-sessions-prod-2 E2E_SESSIONS_APP_1_HOST=clerkstage-sessions-prod-1-e2e.clerk.app pnpm test:integration:base --grep @sessions", "test:integration:tanstack-react-start": "E2E_APP_ID=tanstack.react-start* pnpm test:integration:base --grep @tanstack-react-start", + "test:integration:unit": "vitest run --root integration", "test:integration:vue": "E2E_APP_ID=vue.vite pnpm test:integration:base --grep @vue", "test:typedoc": "pnpm typedoc:generate && cd ./.typedoc && vitest run", "turbo:clean": "turbo daemon clean", diff --git a/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts b/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts index 6821540be29..620e0d57f2b 100644 --- a/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts +++ b/packages/backend/src/api/endpoints/OAuthApplicationsApi.ts @@ -39,6 +39,9 @@ export type RevokeOAuthApplicationTokenParams = { /** @generateWithEmptyComment */ export type GetOAuthApplicationListParams = ClerkPaginationRequest<{ + /** + * Filters by a case-insensitive substring of the application name or an exact client ID. + */ nameQuery?: string; /** * Returns OAuth applications in a particular order. Prefix a value with `+` to sort in ascending order, or `-` to sort in descending order. Defaults to `-created_at`. From 4c48fe111e5d4bb6fcd61c245a2a5ebee8b85858 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 16:02:04 -0600 Subject: [PATCH 5/8] fix(ci): run infrastructure tests after package builds --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index edb5cc0d9bc..7e5d3fc8230 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -294,9 +294,6 @@ jobs: turbo-team: ${{ vars.TURBO_TEAM }} turbo-token: ${{ secrets.TURBO_TOKEN }} - - name: Run integration infrastructure unit tests - run: pnpm test:integration:unit - - name: Run tests in packages run: | if [ "${{ matrix.test-filter }}" = "**" ]; then @@ -309,6 +306,9 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} + - name: Run integration infrastructure unit tests + run: pnpm test:integration:unit + - name: Run Typedoc tests run: | # Only run Typedoc tests for one matrix version and main test run From 7420582ed37eade1664a56b9ff7e5485f0534348 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 16:11:48 -0600 Subject: [PATCH 6/8] chore: add changeset for OAuth application name filter --- .changeset/quiet-owls-filter.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.changeset/quiet-owls-filter.md b/.changeset/quiet-owls-filter.md index a845151cc84..d5e6b617772 100644 --- a/.changeset/quiet-owls-filter.md +++ b/.changeset/quiet-owls-filter.md @@ -1,2 +1,5 @@ --- +'@clerk/backend': minor --- + +Add an optional `nameQuery` filter to `oauthApplications.list()` to search OAuth applications by name or exact client ID. From 518831539554a75d69a88c713fc1d79ff81af6b8 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 16:33:07 -0600 Subject: [PATCH 7/8] test: narrow OAuth cleanup coverage to SDK filter --- .github/workflows/ci.yml | 3 - integration/cleanup/__tests__/cleanup.test.ts | 110 ------------------ package.json | 1 - 3 files changed, 114 deletions(-) delete mode 100644 integration/cleanup/__tests__/cleanup.test.ts diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e5d3fc8230..a9b46942601 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -306,9 +306,6 @@ jobs: env: NODE_VERSION: ${{ matrix.node-version }} - - name: Run integration infrastructure unit tests - run: pnpm test:integration:unit - - name: Run Typedoc tests run: | # Only run Typedoc tests for one matrix version and main test run diff --git a/integration/cleanup/__tests__/cleanup.test.ts b/integration/cleanup/__tests__/cleanup.test.ts deleted file mode 100644 index c139f19f31c..00000000000 --- a/integration/cleanup/__tests__/cleanup.test.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; - -import { getE2EApplicationRunMarker } from '../../testUtils/e2eRun'; - -const { registerCleanup } = vi.hoisted(() => ({ - registerCleanup: vi.fn<(_name: string, cleanup: () => Promise) => void>(), -})); - -vi.mock('@playwright/test', () => ({ test: registerCleanup })); - -describe('OAuth application cleanup', () => { - beforeEach(() => { - vi.resetModules(); - registerCleanup.mockClear(); - vi.stubEnv('INTEGRATION_TEST_RUN_KEY', 'cleanup-regression'); - vi.stubEnv( - 'INTEGRATION_INSTANCE_KEYS', - JSON.stringify({ - 'oauth-provider': { - pk: `pk_test_${Buffer.from('cleanup.clerk.accounts.dev$').toString('base64')}`, - sk: 'sk_test_cleanup', - }, - }), - ); - vi.stubEnv('INTEGRATION_STAGING_INSTANCE_KEYS', '{}'); - vi.stubEnv('CLERK_PLATFORM_API_KEY', ''); - vi.spyOn(console, 'log').mockImplementation(() => {}); - vi.spyOn(console, 'warn').mockImplementation(() => {}); - }); - - afterEach(() => { - vi.unstubAllEnvs(); - vi.unstubAllGlobals(); - vi.restoreAllMocks(); - }); - - it.each([false, true])('filters every page and rejects suffix nonmatches (rate limited: %s)', async rateLimited => { - const marker = getE2EApplicationRunMarker('cleanup-regression'); - const listQueries: Record[] = []; - const deletedIds: string[] = []; - let shouldRateLimit = rateLimited; - - vi.stubGlobal( - 'fetch', - vi.fn((input, init) => { - const request = new Request(input, init); - const url = new URL(request.url); - - if (request.method === 'GET' && url.pathname === '/v1/users') { - return Promise.resolve(Response.json([])); - } - if (request.method === 'GET' && url.pathname === '/v1/users/count') { - return Promise.resolve(Response.json({ total_count: 0 })); - } - if (request.method === 'GET' && url.pathname === '/v1/oauth_applications') { - listQueries.push(Object.fromEntries(url.searchParams)); - if (shouldRateLimit) { - shouldRateLimit = false; - return Promise.resolve( - Response.json( - { errors: [{ code: 'too_many_requests', message: 'Too many requests' }] }, - { - status: 429, - headers: { 'Retry-After': '0' }, - }, - ), - ); - } - - const data = - Number(url.searchParams.get('offset') || 0) === 0 - ? [ - { object: 'oauth_application', id: 'oauthapp_first', name: `e2e-email-${marker}` }, - ...Array.from({ length: 99 }, (_, index) => ({ - object: 'oauth_application', - id: `oauthapp_other_${index}`, - name: `e2e-email-${marker}-other-run`, - })), - ] - : [{ object: 'oauth_application', id: 'oauthapp_second', name: `e2e-other-config-${marker}` }]; - return Promise.resolve(Response.json({ data, total_count: 101 })); - } - if (request.method === 'DELETE' && url.pathname.startsWith('/v1/oauth_applications/')) { - const id = url.pathname.split('/').pop(); - if (id) { - deletedIds.push(id); - } - return Promise.resolve(Response.json({ object: 'oauth_application', id, deleted: true })); - } - - throw new Error(`Unexpected request: ${request.method} ${url}`); - }), - ); - - await import('../cleanup.setup'); - const cleanup = registerCleanup.mock.calls[0]?.[1]; - expect(cleanup).toBeTypeOf('function'); - if (!cleanup) { - throw new Error('Cleanup was not registered'); - } - await cleanup(); - - expect(listQueries).toEqual([ - { name_query: marker, limit: '100' }, - ...(rateLimited ? [{ name_query: marker, limit: '100' }] : []), - { name_query: marker, limit: '100', offset: '100' }, - ]); - expect(deletedIds).toEqual(['oauthapp_first', 'oauthapp_second']); - }); -}); diff --git a/package.json b/package.json index 3bfca2c6aa9..5884e61374c 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "test:integration:sessions": "DISABLE_WEB_SECURITY=true E2E_SESSIONS_APP_1_ENV_KEY=sessions-prod-1 E2E_SESSIONS_APP_2_ENV_KEY=sessions-prod-2 E2E_SESSIONS_APP_1_HOST=multiple-apps-e2e.clerk.app pnpm test:integration:base --grep @sessions", "test:integration:sessions:staging": "DISABLE_WEB_SECURITY=true E2E_SESSIONS_APP_1_ENV_KEY=clerkstage-sessions-prod-1 E2E_SESSIONS_APP_2_ENV_KEY=clerkstage-sessions-prod-2 E2E_SESSIONS_APP_1_HOST=clerkstage-sessions-prod-1-e2e.clerk.app pnpm test:integration:base --grep @sessions", "test:integration:tanstack-react-start": "E2E_APP_ID=tanstack.react-start* pnpm test:integration:base --grep @tanstack-react-start", - "test:integration:unit": "vitest run --root integration", "test:integration:vue": "E2E_APP_ID=vue.vite pnpm test:integration:base --grep @vue", "test:typedoc": "pnpm typedoc:generate && cd ./.typedoc && vitest run", "turbo:clean": "turbo daemon clean", From 74f2151a4eb640e5c359f6e2893cb118dac70bd1 Mon Sep 17 00:00:00 2001 From: austincalvelage Date: Wed, 23 Sep 2026 16:34:43 -0600 Subject: [PATCH 8/8] test: drop unrelated TanStack assertion changes --- integration/tests/tanstack-start/keyless.test.ts | 1 - .../src/server/__tests__/loadOptions.test.ts | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/integration/tests/tanstack-start/keyless.test.ts b/integration/tests/tanstack-start/keyless.test.ts index 009cd71833e..4427a4a1c6a 100644 --- a/integration/tests/tanstack-start/keyless.test.ts +++ b/integration/tests/tanstack-start/keyless.test.ts @@ -36,6 +36,5 @@ test.describe('Keyless mode @tanstack-react-start', () => { expect(response?.status()).toBe(500); expect(app.devOutput).toContain('Missing secretKey'); expect(app.devOutput).toContain('npx clerk@latest link'); - expect(app.devOutput).toContain('npx clerk@latest env pull'); }); }); diff --git a/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts b/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts index 8ea3f6b9c9d..bcd979fe440 100644 --- a/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts +++ b/packages/tanstack-react-start/src/server/__tests__/loadOptions.test.ts @@ -12,8 +12,6 @@ describe('loadOptions', () => { ['only the secret key is missing', { publishableKey: 'pk_test_Zm9vLWJhci0xMi5jbGVyay5hY2NvdW50cy5kZXYk' }], ['both keys are missing', {}], ])('throws the CLI-pointing error when %s', (_, overrides) => { - expect(() => loadOptions(request, overrides)).toThrow( - /Missing secretKey[\s\S]*npx clerk@latest link[\s\S]*npx clerk@latest env pull/, - ); + expect(() => loadOptions(request, overrides)).toThrow(/Missing secretKey[\s\S]*npx clerk@latest link/); }); });