The problem is this: there is an application with Yandex.cards connected API. The API is connected by adding a link in the script tag and creates the global variable ymaps and is used like this:

ymaps.ready(init); function init(){ myMap = new ymaps.Map("map", { center: [55.76, 37.64], zoom: 15, controls: ['zoomControl', 'fullscreenControl'] }); }; 

Accordingly, the test cannot load it and gives the error "ReferenceError: Can't find variable: ymaps." For testing I use Karma + Jasmine. Can you please tell me how to lock it or wrap it in a module to avoid an error?

    0