MCPcopy
hub / github.com/simstudioai/sim / builder

Function builder

apps/sim/lib/logs/list-logs.test.ts:68–75  ·  view source on GitHub ↗

A chainable, thenable query-builder stub that resolves to the given rows.

(rows: unknown[])

Source from the content-addressed store, hash-verified

66
67/** A chainable, thenable query-builder stub that resolves to the given rows. */
68function builder(rows: unknown[]) {
69 const b: Record<string, unknown> = {}
70 for (const method of ['from', 'leftJoin', 'innerJoin', 'where', 'orderBy', 'limit']) {
71 b[method] = () => b
72 }
73 ;(b as { then: unknown }).then = (resolve: (value: unknown) => unknown) => resolve(rows)
74 return b
75}
76
77function workflowRow(overrides: Record<string, unknown> = {}) {
78 return {

Callers 1

list-logs.test.tsFile · 0.85

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected