◐ Shell
clean mode source ↗

refactor(schematics): remove unnecessary `compileComponents` by JeanMeche · Pull Request #33082 · angular/angular-cli

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a fallback, but it is only read when configureTestingModule() applies the TestBed options to the runtime strict-mode flags. createComponent() does not go through that path (at least it wasn't when I implemented it a few years ago, and I don't think it changed).

So if errorOnUnknownProperties is configured to true globally, as the CLI does by default, and the test does not call configureTestingModule(), unknown-property validation still uses the runtime default (false). Adding configureTestingModule() later, for example to override a provider, would then also start applying the global option and change the test behavior. This is the same for a handful of options.