invocationCallOrder of the first `tx.update(table)` call.
(table: unknown)
| 16 | |
| 17 | /** invocationCallOrder of the first `tx.update(table)` call. */ |
| 18 | function updateOrderForTable(table: unknown): number { |
| 19 | const { calls, invocationCallOrder } = dbChainMockFns.update.mock |
| 20 | for (let i = 0; i < calls.length; i++) { |
| 21 | if (calls[i][0] === table) return invocationCallOrder[i] |
| 22 | } |
| 23 | return -1 |
| 24 | } |
| 25 | |
| 26 | describe('updateDocument lock ordering', () => { |
| 27 | beforeEach(() => { |