| 22 | } |
| 23 | |
| 24 | class LoggingVirtualTerminal extends VirtualTerminal { |
| 25 | private writes: string[] = []; |
| 26 | |
| 27 | override write(data: string): void { |
| 28 | this.writes.push(data); |
| 29 | super.write(data); |
| 30 | } |
| 31 | |
| 32 | getWrites(): string { |
| 33 | return this.writes.join(""); |
| 34 | } |
| 35 | |
| 36 | clearWrites(): void { |
| 37 | this.writes = []; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | async function withEnv<T>(updates: Record<string, string | undefined>, run: () => Promise<T>): Promise<T> { |
| 42 | const previousValues = new Map<string, string | undefined>(); |
nothing calls this directly
no outgoing calls
no test coverage detected