diff --git a/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts b/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts index d2dd986c8a58..149a98c3c157 100644 --- a/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts +++ b/packages/angular_devkit/build_angular/test/hello-world-app/src/test.ts @@ -23,10 +23,10 @@ declare const require: { }; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), -); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + errorOnUnknownElements: true, + errorOnUnknownProperties: true +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts index 2e06d42dae8a..a24258af75ba 100644 --- a/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts +++ b/packages/angular_devkit/build_angular/test/hello-world-lib/projects/lib/src/test.ts @@ -24,10 +24,10 @@ declare const require: { }; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), -); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + errorOnUnknownElements: true, + errorOnUnknownProperties: true +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); // And load the modules. diff --git a/packages/schematics/angular/application/files/src/test.ts.template b/packages/schematics/angular/application/files/src/test.ts.template index c04c876075f9..cac5aa3ea352 100644 --- a/packages/schematics/angular/application/files/src/test.ts.template +++ b/packages/schematics/angular/application/files/src/test.ts.template @@ -15,10 +15,10 @@ declare const require: { }; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), -); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + errorOnUnknownElements: true, + errorOnUnknownProperties: true +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/); diff --git a/packages/schematics/angular/library/files/src/test.ts.template b/packages/schematics/angular/library/files/src/test.ts.template index 5775317abc9f..29e4db3829fe 100644 --- a/packages/schematics/angular/library/files/src/test.ts.template +++ b/packages/schematics/angular/library/files/src/test.ts.template @@ -16,10 +16,10 @@ declare const require: { }; // First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), -); +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + errorOnUnknownElements: true, + errorOnUnknownProperties: true +}); // Then we find all the tests. const context = require.context('./', true, /\.spec\.ts$/);