removeFinalNewLine = (string) =>
  string.endsWith("\n") ? string.slice(0, -1) : string
@typedef {{
  isTTY?: boolean,
  stdoutIsTTY?: boolean,
  ci?: boolean,
  mockWriteFileErrors?: Record<string, string>,
  nodeOptions?: string[],
  input?: string,
}} CliTestOptions