Function
makePendingRow
(overrides: Partial<OutboxRow> = {})
Source from the content-addressed store, hash-verified
| 134 | import { enqueueOutboxEvent, processOutboxEvents } from './service' |
| 135 | |
| 136 | function makePendingRow(overrides: Partial<OutboxRow> = {}): OutboxRow { |
| 137 | return { |
| 138 | id: 'evt-1', |
| 139 | eventType: 'test.event', |
| 140 | payload: { foo: 'bar' }, |
| 141 | status: 'pending', |
| 142 | attempts: 0, |
| 143 | maxAttempts: 10, |
| 144 | availableAt: new Date(Date.now() - 1000), |
| 145 | lockedAt: null, |
| 146 | lastError: null, |
| 147 | createdAt: new Date(Date.now() - 5000), |
| 148 | processedAt: null, |
| 149 | ...overrides, |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | function resetState() { |
| 154 | state.claimedRows = [] |
Tested by
no test coverage detected