diff --git a/packages/react-hooks/test/support/test-context.ts b/packages/react-hooks/test/support/test-context.ts index 815f47224a..d7be15cee1 100644 --- a/packages/react-hooks/test/support/test-context.ts +++ b/packages/react-hooks/test/support/test-context.ts @@ -40,12 +40,14 @@ export const testWithDbClient = test.extend<{ clearShape: async ({}, use) => { use(async (table: string, shapeHandle?: string) => { const baseUrl = inject(`baseUrl`) - const resp = await fetch( - `${baseUrl}/v1/shape?table=${table}${shapeHandle ? `&handle=${shapeHandle}` : ``}`, - { - method: `DELETE`, - } - ) + const url = new URL(`${baseUrl}/v1/shape`) + url.searchParams.set(`table`, table) + if (shapeHandle) { + url.searchParams.set(`handle`, shapeHandle) + } + const resp = await fetch(url.toString(), { + method: `DELETE`, + }) if (!resp.ok) { console.error( await FetchError.fromResponse( diff --git a/packages/typescript-client/test/support/test-context.ts b/packages/typescript-client/test/support/test-context.ts index 39d76f152a..c563a88e12 100644 --- a/packages/typescript-client/test/support/test-context.ts +++ b/packages/typescript-client/test/support/test-context.ts @@ -51,7 +51,8 @@ export const testWithDbClient = test.extend<{ } = {} ) => { const baseUrl = inject(`baseUrl`) - const url = new URL(`${baseUrl}/v1/shape?table=${table}`) + const url = new URL(`${baseUrl}/v1/shape`) + url.searchParams.set(`table`, table) if (!options.databaseId) { options.databaseId = inject(`databaseId`)