Here is a simplified version of my code. My callback is not getting called in my tests.
You can play with the code here to test it...
https://jsfiddle.net/ax3svk78/
function(){ return fillIn(myArg);
function fillIn() {
return true;
}
var stubAutoComplete = {
addListener: function(event={}, callback={}) {
callback;
}
}
stubAutoComplete.addListener('place_changed',
function(){ return fillIn(myArg); }
);
I need the anonymous function, per this posting: Unhandled Promise Rejection: TypeError:
My non-stubbed code works, but my stub does not.
How do I modify my stubbed AddListner function to call the function?