code: function quit() {
    if (puppet) {
      puppet.kill("SIGINT");
      puppet = null;
    }
  
    if (server) {
      server.kill();
    }
  
    process.removeListener("exit", quit);
    process.removeListener("SIGINT", quit);
  }
docs: Graceful quit