(who: Child, word: string)
| 143 | } |
| 144 | |
| 145 | async function says(who: Child, word: string): Promise<void> { |
| 146 | const deadline = Date.now() + 30_000; |
| 147 | while (!who.output().includes(word)) { |
| 148 | if (who.child.exitCode !== null || Date.now() > deadline) { |
| 149 | throw new Error(`expected "${word}", got: ${who.output()}`); |
| 150 | } |
| 151 | await new Promise((resolve) => setTimeout(resolve, 10)); |
| 152 | } |
| 153 | } |
| 154 | |
| 155 | it('waits for a process already migrating, then skips the migration it applied', async () => { |
| 156 | pendingV16(); |
no test coverage detected