Set element height in PhantomJS
问题 How do I set element height while testing in PhantomJS? I'm testing on Karma using Jasmine framework and running on PhantomJS headless browser. I'm trying to test an AngularJS directive concerned with "infinite scrolling" (automated loading of items when user scrolls near to the bottom of the container element). I'm not using jQuery, nor do I wish to (unless there's no other way). I'm using .clientHeight , .scrollTop , and .scrollHeight properties. My directive works as expected, at least in