angular/angular-cli · warning
- TODO(s) added for manual review
Error message
- ${totalTodos} TODO(s) added for manual review: What it means
The jasmine-to-vitest refactor schematic's reporter prints a summary of TODO comments it inserted into your test files where automatic conversion was impossible. This header reports the total number of TODO(s) that need manual review.
Solutions
- Search the refactored files for the inserted TODO comments
- Resolve each TODO by rewriting the construct with Vitest APIs (vi.fn, vi.useFakeTimers, expect semantics)
- Re-run the refactor summary or your test suite to confirm all TODOs are addressed
Defensive patterns
Strategy: validation
Validate before calling
// before refactoring, scan tests for hard-to-convert Jasmine APIs
const risky = /jasmine\.clock|fail\(|withContext|customEqualityTester|\.calls\.count\(\)/;
for (const f of testFiles) {
if (risky.test(fs.readFileSync(f,'utf8'))) console.warn(`${f} may produce TODO(s) during refactor`);
} Prevention
- Replace exotic Jasmine APIs (jasmine.clock, fail(), custom matchers) before migrating
- Keep test utilities centralized so only a few files need manual conversion
- After refactor, grep for 'TODO' in test files and resolve before merging
When it happens
Trigger: Running 'ng g @schematics/angular:refactor-jasmine-vitest <project>' when printSummary finds entries in the reporter's todos map — i.e. some Jasmine constructs (e.g. certain spy/matchers/async patterns) could not be converted automatically.
Common situations: Test suites containing Jasmine-specific patterns (fail(), special matchers, custom equality testers, jasmine clock) that the refactor tool can only flag with // TODO comments.
Related errors
- - x
- Cannot add a Vitest configuration as builder for "test"…
- - ${file}
- No "test" target found for project
- Project " " uses a custom coverage reporter " ". This…
AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30).
Data as JSON: /api/errors/38368b8d7da6a752.
Report an issue: GitHub.
Appendix: source
Thrown at packages/schematics/angular/refactor/jasmine-vitest/utils/refactor-reporter.ts:158
this.logger.info('Detailed Transformation Log:');
for (const [filePath, logs] of this.verboseLogs) {
this.logger.info(`Processing: ${filePath}`);
logs.forEach((log) => this.logger.info(` - ${log}`));
}
this.logger.info(''); // Add a blank line for separation
}
this.logger.info('Jasmine to Vitest Refactoring Summary:');
this.logger.info(`- ${this.filesScanned} test file(s) scanned.`);
this.logger.info(`- ${this.filesTransformed} file(s) transformed.`);
const filesSkipped = this.filesScanned - this.filesTransformed;
if (filesSkipped > 0) {
this.logger.info(`- ${filesSkipped} file(s) skipped (no changes needed).`);
}
if (this.todos.size > 0) {
const totalTodos = [...this.todos.values()].reduce((a, b) => a + b, 0);
this.logger.warn(`- ${totalTodos} TODO(s) added for manual review:`);
for (const [category, count] of this.todos) {
this.logger.warn(` - ${count}x ${category}`);
}
}
}
}
View on GitHub (pinned to bb72145f9a)