@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
ts 15 lines 602 Bytes
Raw
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 };