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

Function createDbMock

packages/billing/src/__tests__/grant-credits.test.ts:60–79  ·  view source on GitHub ↗
(options: {
  user: {
    next_quota_reset: Date | null
    auto_topup_enabled: boolean | null
  } | null
})

Source from the content-addressed store, hash-verified

58})
59
60const createDbMock = (options: {
61 user: {
62 next_quota_reset: Date | null
63 auto_topup_enabled: boolean | null
64 } | null
65}) => {
66 const { user } = options
67
68 return {
69 select: () => ({
70 from: () => ({
71 where: () => ({
72 orderBy: () => ({
73 limit: () => [],
74 }),
75 }),
76 }),
77 }),
78 }
79}
80
81const createTransactionMock = (
82 user: {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected