Choose the fastest usable image, boot a VirtualMachine from it, and (for non-warm images) sync + build the source in the guest. The caller owns the returned VM and must call vm.stop().
const { vm, image } = await prepareVm({ projectRoot: '/path/to/edgible', imagesDir: '/path/to/edgible/integration_tests/vm/images',});try { console.log(`booted ${image.kind} image`); const { stdout } = await vm.exec('node --version');} finally { await vm.stop();} Copy
const { vm, image } = await prepareVm({ projectRoot: '/path/to/edgible', imagesDir: '/path/to/edgible/integration_tests/vm/images',});try { console.log(`booted ${image.kind} image`); const { stdout } = await vm.exec('node --version');} finally { await vm.stop();}
Choose the fastest usable image, boot a VirtualMachine from it, and (for non-warm images) sync + build the source in the guest. The caller owns the returned VM and must call vm.stop().