<commit_before>'use strict';

define([
  'router', 'sinon', 'jquery', 'underscore', 'jasmine-sinon'
], function(Router, Sinon, $, _) {
  describe('Router routes', function() {
    beforeEach(function() {
      this.router = Router.initialize();
      this.routeSpy = Sinon.spy();
      try {
        Backbone.history.start({silent: true, pushState: true});
      } catch(e) { }
      this.router.navigate('elsewhere');
    });

    it("fires the index route with a blank hash", function() {
      this.router.bind('route:defaultAction', this.routeSpy);
      this.router.navigate('', true);
      expect(this.routeSpy).toHaveBeenCalledOnce();
      expect(this.routeSpy).toHaveBeenCalledWith();
    });
  });
});<commit_msg>Added tests for all the routes<commit_after>'use strict';

define(['router', 'jquery', 'underscore', 'sinon', 'jasmine-sinon'], function(Router, $, _) {
  describe('Router routes', function() {
    var router, routeSpy;

    beforeEach(function() {
      router = Router.initialize();
      routeSpy = sinon.spy();
      try {
        Backbone.history.start({silent: true, pushState: true});
      } catch(e) { }
      router.navigate('elsewhere');
    });

    afterEach(function() {
      Backbone.history.stop();
    });

    it('fires the index route with a blank hash', function() {
      router.on('route:defaultAction', routeSpy);
      router.navigate('', true);
      expect(routeSpy).toHaveBeenCalledOnce();
      expect(routeSpy).toHaveBeenCalledWith();
    });

    it('fires the projects route', function() {
      router.bind('route:showProjectsList', routeSpy);
      router.navigate('projects', true);
      expect(routeSpy).toHaveBeenCalledOnce();
      expect(routeSpy).toHaveBeenCalledWith();
    });

    it('fires the resume route', function() {
      router.bind('route:showResume', routeSpy);
      router.navigate('resume', true);
      expect(routeSpy).toHaveBeenCalledOnce();
      expect(routeSpy).toHaveBeenCalledWith();
    });
  });
});
{'fraction_non_alphanumeric': 0.16934673366834171, 'fraction_numerical': 0.0, 'mean_word_length': 3.504524886877828, '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': '7532174', 'n_tokens_mistral': 622, 'n_tokens_neox': 614, 'n_words': 110}