angular/angular-cli · warning

- ${count}x ${category}

Error message

  - ${count}x ${category}

What it means

Detail line printed by the jasmine-vitest refactor reporter's summary: one line per TODO category showing how many TODOs of that kind were added (e.g. '3x spyOn semantics').

Source

Thrown at packages/schematics/angular/refactor/jasmine-vitest/utils/refactor-reporter.ts:160

        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)

Solutions

  1. Read the per-category counts to prioritize the manual work (e.g. many fake-timer TODOs first)
  2. Grep for the TODO comments of each category and convert them to Vitest equivalents
  3. Delete the TODO comments after resolving each item
Defensive patterns

Strategy: validation

Validate before calling

// estimate TODO volume before refactoring
const patterns = { clock: /jasmine\.clock/g, fail: /\bfail\(/g, matchers: /toMatch|toContAin|toHaveBeenCalledWith/g };
for (const [cat, re] of Object.entries(patterns)) {
  const n = testFiles.reduce((a,f) => a + (fs.readFileSync(f,'utf8').match(re)?.length || 0), 0);
  if (n) console.log(`${n}x potential ${cat} TODO(s)`);
}

Prevention

When it happens

Trigger: printSummary iterating this.todos after a jasmine-vitest refactor run where at least one TODO category was recorded.

Common situations: Mixed test suites with several classes of unconvertible Jasmine constructs; each category count tells you what kind of manual work remains.

Related errors


AI-assisted analysis of angular/angular-cli@bb72145f9a (2026-08-30). Data as JSON: /api/errors/6ecfca78d063d260. Report an issue: GitHub.