(name: string)
| 157 | |
| 158 | const order: string[] = [] |
| 159 | const makeProvider = (name: string) => |
| 160 | ({ |
| 161 | handleZooCodeCallback: vi.fn(async () => { |
| 162 | order.push(`${name}:start`) |
| 163 | // Yield to the event loop so a concurrent call would interleave. |
| 164 | await new Promise((resolve) => setTimeout(resolve, 0)) |
| 165 | order.push(`${name}:end`) |
| 166 | }), |
| 167 | }) as any |
| 168 | |
| 169 | const a = makeProvider("a") |
| 170 | const b = makeProvider("b") |