In need of assistance with testing a TypeScript method (eventually testing the actual JavaScript) that I'm having trouble with. The method is quite straightforward:
private static myMethod(foo: IFoo): void {
let anInterestingThing = new InterestingThing();
foo.bar = anInterestingThing.getSomethingCool();
}
I am looking to verify that getSomethingCool
has been called during testing, but I am unsure on how to spy on the new anInterestingThing
object. Does anyone know the most effective approach for achieving this?