Hi
Trying to test a function Visible that was written by someone and am getting error: TS2322 Type 'true' is not assignable to type ''COCTRefundHeadingLogic'
Below is the class
- export class COCTRefundHeadingLogic extends Logic {
- visible = (store: RequestStore): boolean => {
- let storeCouncil: Council = store.getValue([GeneralFieldKeys.GeneralCouncil]);
- if (storeCouncil != "CPT")
- return false;
- return true;
- }
- }
Below is the test
- describe('CoctRefund', () => {
- let component: COCTRefundBuyersHeadingLogic ;
- beforeEach(() => {
- component = new COCTRefundBuyersHeadingLogic(null);//Not sure what to do here
- });
- it('should be visibly true', () => {
- expect(component.visible).toEqual(true);
- });
- });
Debasis SahaPosted Feb 22, 2018, 12:08 PM