MCPcopy Index your code
hub / github.com/simstudioai/sim / executedSqlContaining

Function executedSqlContaining

apps/sim/lib/billing/core/usage-log.test.ts:210–214  ·  view source on GitHub ↗
(tx: { execute: ReturnType<typeof vi.fn> }, substring: string)

Source from the content-addressed store, hash-verified

208
209 /** True when any tx.execute call ran a sql`` template containing the substring. */
210 const executedSqlContaining = (tx: { execute: ReturnType<typeof vi.fn> }, substring: string) =>
211 tx.execute.mock.calls.some(([arg]) => {
212 const strings = (arg as { strings?: readonly string[] } | null)?.strings
213 return Array.isArray(strings) && strings.some((s) => s.includes(substring))
214 })
215
216 it('inserts the full cumulative on the first flush', async () => {
217 setupTx(null)

Callers 1

usage-log.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected