Handle event inside spec file

45 views
Skip to first unread message

Jithin Raveendran

unread,
Jan 9, 2020, 9:06:50 AM1/9/20
to Jasmine
I wanted to test a function which have arguments type event. Inside the function it was checking whether the event object passed (lets say eventObj) eventObj.target.checked is true or not.
How to handle this in the spec file?

If I'm planning to call the function in spec file, Ho can I create a dummy object having dummyObj.target.checked as true, so that I can get inside the if condition.
Reply all
Reply to author
Forward
0 new messages