JS unit tests refactoring

Server responses handlers improved.