Jasmine + TypeScript + Angular 1.58 + test anonymous functions


I have a anonymous function inside a button component that I can’t and don’t know how to test.

I can call it as publicmodel.button.fn()

when I test the expect for it, it tells me its not a spy although I use spyon before that.

Any ideas?

also how to test promises?