We just would like to test ChangeDetection value on few components but we don't find a way to access easly to component metadata. For pipe we have found:
it('should be marked as pure', () => {
expect(new PipeResolver().resolve(TranslatePipe).pure).toEqual(true);
});
Main problem here is to find a easy way to do it for component and check if it is OnPush
or not. Any idea here? So thanks.
Aucun commentaire:
Enregistrer un commentaire