I need process.exit to actually interrupt the execution. With a plain spy the execution continues.