(promise, ms = 5000)
| 7 | const TEST_FILE_VM = path.join(MOUNT_DIR, 'vm_hello.txt'); |
| 8 | |
| 9 | function withTimeout(promise, ms = 5000) { |
| 10 | return Promise.race([ |
| 11 | promise, |
| 12 | new Promise((_, reject) => setTimeout(() => reject(new Error(`Timeout after ${ms}ms`)), ms)) |
| 13 | ]); |
| 14 | } |
| 15 | |
| 16 | async function test() { |
| 17 | console.log("Initializing AgentVM with mount..."); |