Updating unit tests

In order to keep your unit tests running, you will need to import MaterialModule to any component's spec file that uses Angular material:

*.component.spec.ts...  beforeEach(    async(() => {      TestBed.configureTestingModule({        ...        imports: [..., MaterialModule, NoopAnimationsModule],      }).compileComponents()    })  )

You will also need to update any test, including e2e tests, that search for a particular HTML element.

For example, since the app's title, LocalCast Weather, is not in an h1 tag anymore, you must update the spec file to look for it in a span element:

src/app/app.component.spec.tsexpect(compiled.querySelector('span').textContent).toContain('LocalCast Weather')

Similarly, in e2e tests, you will need to update your page object ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.