in packages/f2etest/src/private/runCommand.ts [3:18]
export async function runCommand(projectPath: string, command: string) {
await new Promise<void>((resolve, reject) => {
const child = spawn(command, {
cwd: projectPath,
shell: true,
});
child.on('close', (code) => {
if (code === 0) {
resolve();
} else {
reject();
}
});
});
}