Can't bind to 'matMenuTriggerFor' since it isn't a known property of 'button'

前端 未结 6 1238
执笔经年
执笔经年 2021-01-03 17:15

I\'m getting following error when I try to test an angular component:

Error while running jest tests:

Can\'t bind to \'matMenuTriggerFor\' since it i         


        
6条回答
  •  花落未央
    2021-01-03 18:13

    I was getting this error while running jest test. I had to add MatMenuModule in the import array of TestBed.configureTestingModule to resolve this error.

提交回复
热议问题