title: This constructor is not compatible with Angular Dependency Injection because its dependency at index 0 of the parameter list is invalid
body: <p>In my Angular 9 app, I have an abstract class:</p>
  
  <pre><code>export abstract class MyAbstractComponent {
    constructor(
      protected readonly cd: ChangeDetectorRef,
    ) {
      super();
    }
  
    // ...
  }
  </code></pre>
  
  <p>and a Component extending it:</p>
  
  <pre><code>@Component({
    // ...
  })
  export class MyConcreteComponent extends MyAbstractComponent {
    // ...
  }
  </code></pre>
  
  <p>Everything works fine except the tests, where I get the following error:</p>
  
  <blockquote>
    <p>Error: This constructor is not compatible with Angular Dependency
    Injection because its dependency at index 0 of the parameter list is
    invalid.
    This can happen if the dependency type is a primitive like a string or if an ancestor of this class is missing an Angular
    decorator.</p>
    
    <p>Please check that 1) the type for the parameter at index 0 is correct and 2) the correct Angular decorators are defined for this
    class and its ancestors.</p>
  </blockquote>