I made a pull request that makes your tests work. https://github.com/bennyjo/angular-smoothscroll/commit/e660a8e1a4497907a9c74d9e359f2bbfa0b8326c
The main problem was that there was no place where you could scroll the window. Therefore, scrolling was not possible, and the tests failed. I added some height to the body element to make a scrollable window.
$('body').height(window.innerHeight*2).append @target
I also reset the scroll position before each test. If we do not, the second test will fail.
window.scrollTo(0, 0);
source share