<commit_before>'use strict';

var Router = require('../src/js/router.js'),
  PageView = require('../src/js/framework/page');

describe('Router', function() {

  var router;

  beforeEach(function() {
    router = new Router();
  });

  describe('The Routes', function() {

    describe('home', function() {
      xit('should load the home screen', function() {
        router.home();
      });
    });

    describe('contacts', function() {
      xit('should load the contacts screen', function() {
        router.contacts();
        expect(true).toBeTruthy();
      });
    });

  });

  describe('changeView', function() {

    var view;

    beforeEach(function() {
      view = new PageView();
    });

    describe('Loading a new view', function() {<commit_msg>Better test coverage for router<commit_after>'use strict';

var Router = require('../src/js/router.js'),
  PageView = require('../src/js/framework/page'),
  HomePage = require('../src/js/views/homePage'),
  ContactPage = require('../src/js/views/contactsPage');

describe('Router', function() {

  var router;

  beforeEach(function() {
    router = new Router();
  });

  describe('The Routes', function() {

    beforeEach(function () {
      spyOn(router, 'changeView');
    });

    describe('home', function() {
      it('should load the home screen', function() {
        router.home();
        var isHomePage = router.changeView.calls.argsFor(0)[0] instanceof HomePage;
        expect(isHomePage).toBeTruthy();
      });
    });

    describe('contacts', function() {
      it('should load the contacts screen', function() {
        router.contacts();
        var isContactPage = router.changeView.calls.argsFor(0)[0] instanceof ContactPage;
        expect(isContactPage).toBeTruthy();
      });
    });

  });

  describe('changeView', function() {

    var view;

    beforeEach(function() {
      view = new PageView();
    });

    describe('Loading a new view', function() {
{'fraction_non_alphanumeric': 0.17366803278688525, 'fraction_numerical': 0.0020491803278688526, 'mean_word_length': 2.9534412955465585, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6136827', 'n_tokens_mistral': 589, 'n_tokens_neox': 565, 'n_words': 122}