Fixed a potential bug in karma tests. The router was not always mocked correctly, which would cause errors if order of tests is changed