Added unit tests for nav.js