MCPcopy Index your code
hub / github.com/TanStack/ai / buildHarnessUrl

Function buildHarnessUrl

testing/e2e/tests/structured-output-middleware.spec.ts:35–48  ·  view source on GitHub ↗

* E2E coverage for the structured-output × middleware interaction * introduced in TanStack/ai#390. Two contracts under test: * * 1. Phase observation: the middleware chain sees chunks tagged with * `ctx.phase === 'structuredOutput'` and `onFinish` is invoked exactly * once. Guards a

(
  testId?: string,
  aimockPort?: number,
  provider?: string,
  model?: string,
)

Source from the content-addressed store, hash-verified

33 */
34
35function buildHarnessUrl(
36 testId?: string,
37 aimockPort?: number,
38 provider?: string,
39 model?: string,
40): string {
41 const params = new URLSearchParams()
42 if (testId) params.set('testId', testId)
43 if (aimockPort) params.set('aimockPort', String(aimockPort))
44 if (provider) params.set('provider', provider)
45 if (model) params.set('model', model)
46 const qs = params.toString()
47 return `/middleware-test${qs ? '?' + qs : ''}`
48}
49
50function parseStringArray(raw: string | null): Array<string> {
51 if (!raw) return []

Calls 2

toStringMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected