{"record":{"id":"f6c6893e9f392b5b","repo":"ReactiveX/rxjs","slug":"unknown-framework-framework","errorCode":null,"errorMessage":"Unknown framework: ${framework}","messagePattern":"Unknown framework: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/migrate/src/cli.ts","lineNumber":146,"sourceCode":"        break;\n      case '--out-dir':\n        options.outputRoot = requiredValue(argv, ++index, argument);\n        break;\n      case '--source-repo':\n        options.repository = requiredValue(argv, ++index, argument);\n        break;\n      case '--source-sha':\n        options.sha = requiredValue(argv, ++index, argument);\n        break;\n      case '--mode': {\n        const mode = requiredValue(argv, ++index, argument);\n        if (mode !== 'cold' && mode !== 'platform') throw new Error(`Unknown mode: ${mode}`);\n        options.mode = mode;\n        break;\n      }\n      case '--framework': {\n        const framework = requiredValue(argv, ++index, argument);\n        if (framework !== 'preserve' && framework !== 'mocha-chai-vitest') throw new Error(`Unknown framework: ${framework}`);\n        options.framework = framework;\n        break;\n      }\n      case '--write':\n        options.write = true;\n        break;\n      case '--help':\n      case '-h':\n        options.help = true;\n        break;\n      default:\n        if (argument.startsWith('-')) throw new Error(`Unknown option: ${argument}`);\n        options.files.push(argument);\n    }\n  }\n  return options;\n}\n","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/ReactiveX/rxjs/blob/54796b38a57e6309f9861e174737479bb3f63f61/packages/migrate/src/cli.ts#L128-L164","documentation":"Thrown by parseArguments in the @rxjs/migrate CLI when --framework receives an unrecognized value. Only 'preserve' (leave test framework untouched) and 'mocha-chai-vitest' (rewrite Mocha/Chai assertions to Vitest) are supported; anything else stops parsing.","triggerScenarios":"Passing `--framework jest`, `--framework jasmine`, or a misspelled value like `--framework mochachai` to the CLI.","commonSituations":"Trying to migrate a Jest or Karma suite (unsupported), assuming framework names from other codemods, or typos in scripts copied from migration docs.","solutions":["Use --framework preserve if your framework is not Mocha/Chai","Use --framework mocha-chai-vitest only when rewriting Mocha+Chai tests to Vitest","Run with --help to confirm accepted values"],"exampleFix":"// before\nnpx @rxjs/migrate --framework jest ...\n// after\nnpx @rxjs/migrate --framework preserve ...","handlingStrategy":"validation","validationCode":"const FRAMEWORKS = new Set(['preserve', 'mocha-chai-vitest']);\nif (!FRAMEWORKS.has(framework)) {\n  console.error(`--framework must be one of ${[...FRAMEWORKS].join(' | ')}`);\n  process.exit(1);\n}","typeGuard":"const isFramework = (v: string): v is 'preserve' | 'mocha-chai-vitest' => v === 'preserve' || v === 'mocha-chai-vitest';","tryCatchPattern":"try { runCli(argv); } catch (e) { console.error((e as Error).message); }","preventionTips":["Pin allowed framework values in the wrapper script","Use --framework preserve for anything other than Mocha/Chai suites"],"tags":["cli","argument-validation","migration","test-framework"],"backgroundTag":"invalid-cli-argument","analyzedSha":"54796b38a57e6309f9861e174737479bb3f63f61","analyzedAt":"2026-08-28T10:21:27.410Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}