The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import * as Test from "@alchemy.run/test/Alchemy"; |
| 2 | import { makeEc2VpcCapacityLease } from "./VpcCapacity.ts"; |
| 3 | |
| 4 | /** Test adapter for files that create custom VPCs. */ |
| 5 | export const make = <ROut = any>(options: Test.MakeOptions<ROut>, permits: 1 | 2 = 1) => { |
| 6 | const api = Test.make(options); |
| 7 | const lease = makeEc2VpcCapacityLease(permits); |
| 8 | |
| 9 | // Waiting is intentional scheduling across the full AWS run, not a cloud |
| 10 | // operation, so it uses the run's hard wall rather than a per-test budget. |
| 11 | api.beforeAll(lease.acquire, { timeout: 3_600_000 }); |
| 12 | api.afterAll(lease.release); |
| 13 | |
| 14 | return api; |
| 15 | }; |