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);
- });
- it('should be visibly true', () => {
-
- expect(component.visible).toEqual(true);
- });
-
- });