//Use .toContain() const btn = fixture.debugElement.nativeElement.querySelector('#btn-create'); expect(btn.innerHTML).toContain('Create');