MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / createConnMock

Function createConnMock

packages/billing/src/__tests__/subscription.test.ts:231–247  ·  view source on GitHub ↗
(overrides: Array<{
      credits_per_block: number
      block_duration_hours: number
      weekly_credit_limit: number
    }>)

Source from the content-addressed store, hash-verified

229
230 describe('getSubscriptionLimits', () => {
231 function createConnMock(overrides: Array<{
232 credits_per_block: number
233 block_duration_hours: number
234 weekly_credit_limit: number
235 }>) {
236 return {
237 select: () => ({
238 from: () => ({
239 where: () => ({
240 limit: () => overrides,
241 }),
242 }),
243 }),
244 update: () => ({}),
245 insert: () => ({}),
246 } as any
247 }
248
249 it('should use limit override when one exists', async () => {
250 const conn = createConnMock([{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected