我想在我的组件中调用一个私有方法。
私有方法:
"Spec It:" (规格说明)
私有方法:
private test(): void {
return true;
}
"Spec It:" (规格说明)
it('should call test method and return true', () => {
const response = component.test();
expect(response).toBeTruthy();
});
问题:
提示信息:"属性 'test' 是私有的,只能在类“MyTestComponent”内部访问。"