refactoring js unit tests, up to navcontroller stuff