<commit_before>goog.require('mvc.Router');



var router;

var setUp = function() {
    router = new mvc.Router();
}

var testNavigation = function() {
    router.navigate("testing");
    loc = document.location.toString();
    assertEquals(loc.replace(/.*#/,''), "testing");
};

var testRoute = function() {
    var reached = false;
    var a = function(){reached = true};
    router.route("test", a);
    router.navigate("test");
    waitForEvent(router.history_, goog.history.EventType.NAVIGATE,
        function() {
            assert(reached);
        });
};
<commit_msg>fix router test<commit_after>goog.require('mvc.Router');

goog.require('goog.testing.ContinuationTestCase');
goog.require('goog.testing.jsunit');

var router;

var setUp = function() {
    router = new mvc.Router();
}

var testNavigation = function() {
    router.navigate("testing");
    loc = document.location.toString();
    assertEquals(loc.replace(/.*#/,''), "testing");
};

var testRoute = function() {
    var reached = false;
    var a = function(){reached = true};
    router.route("test", a);
    router.navigate("test");
    waitForEvent(router.history_, goog.history.EventType.NAVIGATE,
        function() {
            assert(reached);
        });
};


testCase = new goog.testing.ContinuationTestCase();
testCase.autoDiscoverTests();
G_testRunner.initialize(testCase);

{'fraction_non_alphanumeric': 0.16911764705882354, 'fraction_numerical': 0.0, 'mean_word_length': 3.629251700680272, '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': '2043103', 'n_tokens_mistral': 424, 'n_tokens_neox': 414, 'n_words': 77}