Unit testing after add google analytics plugin

Hallo, after i add google-analytics-plugin and the code
if (typeof window.analytics !== undefined) {
console.log(‘start analytics’);
} else {
console.log(“Google Analytics Unavailable”);
all work and analytics start but when i run the my unit test it’s failed by
analytics is not defined
do i need to add any new file to krama watch ?