#testing prototype function in jasmine
21 messages · Page 1 of 1 (latest)
The problem is not about your test but your code. I guess res is not typed.
And the code itself is broken as there is a missing )
Yes
the fix
Like a proper type, not any.
And that's not even valid syntax. Type res where you define it
it is object can you show me once sorry for troubling
Adding types is not even about fixing your error, it's about using proper API: it feels like you are using random code as you don't even understand the format of your data
Log this.res and create an interface based on it
Like I said, it's not even about the test : your code is broken so there is no way your condition might succeed.
That's why we use types, to help ourselves.
No as I would fix the code firstly following previous advices. Good luck