Function
createDbMock
(options: {
user: {
next_quota_reset: Date | null
auto_topup_enabled: boolean | null
} | null
})
Source from the content-addressed store, hash-verified
| 58 | }) |
| 59 | |
| 60 | const 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 | |
| 81 | const createTransactionMock = ( |
| 82 | user: { |
Tested by
no test coverage detected