AndrewPoyntz / time-ago-pipe

An Angular pipe for converting a date string into a time ago
MIT License
130 stars 67 forks source link

testing component with pipe #32

Open MartynenkoA opened 5 years ago

MartynenkoA commented 5 years ago

Trying to test component but have error {{[ERROR ->] moment | amTimeAgo }}

The pipe 'amTimeAgo' could not be found ("}}

TestBed.configureTestingModule({
  declarations: [
    Component,
    TimeAgoPipe
  ]
})
  .compileComponents();

}));

How I can test component with it?

Gilwyad commented 4 years ago

@MartynenkoA the pipe is called timeAgo, not amTimeAgo.

        <td>{{email.date | timeAgo}}</td>