I have to test a function of a Angular component, but this component use a function that comes of a JavaScript script that is imported on project by angular.json. I can use this function on component by declaring it like declare function capture(type, title, screenTitle);
My quesyion is, there is a way to spy this JS function with Jest to check if it was called once on the component?