{"id":"63050387410d5245","repo":"jestjs/jest","slug":"pretty-format-options-min-and-indent-cannot-b","errorCode":null,"errorMessage":"pretty-format: Options \"min\" and \"indent\" cannot be used together.","messagePattern":"pretty-format: Options \"min\" and \"indent\" cannot be used together\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/pretty-format/src/index.ts","lineNumber":431,"sourceCode":"  indent: 2,\n  maxDepth: Number.POSITIVE_INFINITY,\n  maxWidth: Number.POSITIVE_INFINITY,\n  min: false,\n  plugins: [],\n  printBasicPrototype: true,\n  printFunctionName: true,\n  theme: DEFAULT_THEME,\n});\n\nfunction validateOptions(options: OptionsReceived) {\n  for (const key of Object.keys(options)) {\n    if (!Object.prototype.hasOwnProperty.call(DEFAULT_OPTIONS, key)) {\n      throw new Error(`pretty-format: Unknown option \"${key}\".`);\n    }\n  }\n\n  if (options.min && options.indent !== undefined && options.indent !== 0) {\n    throw new Error(\n      'pretty-format: Options \"min\" and \"indent\" cannot be used together.',\n    );\n  }\n\n  if (options.theme !== undefined) {\n    if (options.theme === null) {\n      throw new Error('pretty-format: Option \"theme\" must not be null.');\n    }\n\n    if (typeof options.theme !== 'object') {\n      throw new TypeError(\n        `pretty-format: Option \"theme\" must be of type \"object\" but instead received \"${typeof options.theme}\".`,\n      );\n    }\n  }\n}\n\nconst getColorsHighlight = (options: OptionsReceived): Colors =>","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/jestjs/jest/blob/f49721c78e195558b40913977c9230f5b7f559d8/packages/pretty-format/src/index.ts#L413-L449","documentation":"Error \"pretty-format: Options \"min\" and \"indent\" cannot be used together.\" thrown in jestjs/jest.","triggerScenarios":"Thrown at packages/pretty-format/src/index.ts:431 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass either \"min\": true or a custom \"indent\" option to pretty-format, not both. Remove one of the two options from the call."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"f49721c78e195558b40913977c9230f5b7f559d8","analyzedAt":"2026-08-03T20:16:28.571Z","schemaVersion":2}