In my case i solved this issue by:
1) placing NgxMaterialTimepickerModule
in app module imports:[ ]
2) placing NgxMaterialTimepickerModule
in testmodule.ts imports:[ ]
3) placing testcomponent
in declartions:[ ]
and entryComponents:[ ]
(I'm using angular 8+ version)