Angular 10 Dependency Injection fails for extension classes without constructors in unit tests

I have recently upgraded an Angular app from version 8 to version 10. In the app I make use of extension classes like the following pattern:

export class MyBaseClass {
  constructor(myDependencyService: MyDependencyService,...) {}

export class MyExtensionClass extends MyBaseClass {
  // no explicit constructor in extension class

The application runs as expected, with all dependencies correctly injected into the base class constructor on instantiation of the extension class. However, when unit tests are run, the dependency injection falls apart, and all of the arguments to the base class constructor are undefined.

Looking at the compiled source code in the browser dev tools, the Angular-generated factory for the extension class looks completely different when executing tests than it is when running the application: when running the tests, the compiled factory passes no parameters when creating the extension class.

I have followed all the recommendations for upgrading to the Ivy compiler, and all classes that use DI are decorated and working correctly in the app. Is there some peculiarity that causes different compilation results when executing tests? Have I missed some configuration change that affects the unit tests?

Source: Angular Questions