0
我曾經嘗試這樣做,只需要第一個:Angular2:如何覆蓋多個供應商在TestComponentBuilder
.overrideProviders(LongProfile, [provide(AppService, { useClass: MockAppService }),provide(ProfileService, { useClass: MockProfService }),provide(AppService1, { useClass: MockAppService1 })])
任何想法?