{"record":{"id":"62a348ae8364df97","repo":"microsoft/playwright","slug":"config-updatesnapshots-must-be-one-of-all-changed-missing","errorCode":null,"errorMessage":"config.updateSnapshots must be one of \"all\", \"changed\", \"missing\", \"none\" or \"default\"","messagePattern":"config\\.updateSnapshots must be one of \"all\", \"changed\", \"missing\", \"none\" or \"default\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/playwright/src/common/configLoader.ts","lineNumber":242,"sourceCode":"      throw errorWithFile(file, `config.reportSlowTests must be an object`);\n    if (!('max' in config.reportSlowTests) || typeof config.reportSlowTests.max !== 'number' || config.reportSlowTests.max < 0)\n      throw errorWithFile(file, `config.reportSlowTests.max must be a non-negative number`);\n    if (!('threshold' in config.reportSlowTests) || typeof config.reportSlowTests.threshold !== 'number' || config.reportSlowTests.threshold < 0)\n      throw errorWithFile(file, `config.reportSlowTests.threshold must be a non-negative number`);\n  }\n\n  if ('shard' in config && config.shard !== undefined && config.shard !== null) {\n    if (!config.shard || typeof config.shard !== 'object')\n      throw errorWithFile(file, `config.shard must be an object`);\n    if (!('total' in config.shard) || typeof config.shard.total !== 'number' || config.shard.total < 1)\n      throw errorWithFile(file, `config.shard.total must be a positive number`);\n    if (!('current' in config.shard) || typeof config.shard.current !== 'number' || config.shard.current < 1 || config.shard.current > config.shard.total)\n      throw errorWithFile(file, `config.shard.current must be a positive number, not greater than config.shard.total`);\n  }\n\n  if ('updateSnapshots' in config && config.updateSnapshots !== undefined) {\n    if (typeof config.updateSnapshots !== 'string' || !['all', 'changed', 'missing', 'none', 'default'].includes(config.updateSnapshots))\n      throw errorWithFile(file, `config.updateSnapshots must be one of \"all\", \"changed\", \"missing\", \"none\" or \"default\"`);\n  }\n\n  if ('retryStrategy' in config && config.retryStrategy !== undefined) {\n    if (typeof config.retryStrategy !== 'string' || !['immediate', 'isolated'].includes(config.retryStrategy))\n      throw errorWithFile(file, `config.retryStrategy must be one of \"immediate\" or \"isolated\"`);\n  }\n\n  if ('tsconfig' in config && config.tsconfig !== undefined) {\n    if (typeof config.tsconfig !== 'string')\n      throw errorWithFile(file, `config.tsconfig must be a string`);\n    if (!fs.existsSync(path.resolve(file, '..', config.tsconfig)))\n      throw errorWithFile(file, `config.tsconfig does not exist`);\n  }\n}\n\nfunction validateProject(file: string, project: Project, title: string) {\n  if (typeof project !== 'object' || !project)\n    throw errorWithFile(file, `${title} must be an object`);","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/microsoft/playwright/blob/500c9c822ce7664539a4c8a88810048dfe090c3b/packages/playwright/src/common/configLoader.ts#L224-L260","documentation":"A config validation error from validateConfig in the Playwright test runner's config loader: the updateSnapshots option was set to a value outside the allowed enum. Playwright only accepts the snapshot-update modes 'all', 'changed', 'missing', 'none' and 'default' (the default meaning defer to CLI flags), and any other string fails this guard while loading the config file.","triggerScenarios":"Thrown at packages/playwright/src/common/configLoader.ts:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set updateSnapshots to one of the allowed values: \"all\", \"changed\", \"missing\", \"none\" or \"default\"","Remove the updateSnapshots key entirely to fall back to its default behavior","Check for typos such as \"only\" or \"yes\" that are not valid modes"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"500c9c822ce7664539a4c8a88810048dfe090c3b","analyzedAt":"2026-09-15T07:37:15.003Z","contentChangedAt":"2026-09-15T07:37:15.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}