TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Anele Ngqandu
1.3k
429
28.1k
Angular Testing error issues
Feb 15 2018 2:32 AM
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
);
});
});
Reply
Answers (
1
)
Angular and CSS
Filter items by | unique:'Category'