In my code there's a line:
var contentWidth = angular.element(document.querySelector('.content'))[0].clientWidth;
It works fine when running the app but when unit testing I get error:
TypeError: 'undefined' is not an object (evaluating 'angular.element(document.querySelector('.content'))[0].clientWidth')
How to solve this issue?