<commit_before>var Assert  = require('assert');
var Url     = require('url');
var Router  = require('../');

var routes = {
  emptyRoute: '/',
  noParams: '/show',
  oneParam: '/show/:title',
  overlyComplicated : '/hello/:planet?foo=:foo&fruit=:fruit#:section',
};

var router = new Router(routes);

module.exports = {
  'Matched route url method should': {
    'properly handle': {
      'matched url route': function () {
        var original = '/show/derp';
        var url = router.match({
          url : original
        }).url();

        Assert.equal(url, original);
      },

      'empty route': function () {
        var url = router.match({ 
          route : {<commit_msg>test cleanup<commit_after>var Assert  = require('assert');
var Url     = require('url');
var Router  = require('../');

var routes = {
  emptyRoute: '/',
  noParams: '/show',
  oneParam: '/show/:title',
  overlyComplicated : '/hello/:planet?foo=:foo&fruit=:fruit#:section',
};

var router = new Router(routes);

module.exports = {
  'MatchedRoute url method should': {
    'properly handle': {
      'matched url route': function () {
        var original = '/show/derp';
        var url = router.match({
          url : original
        }).url();

        Assert.equal(url, original);
      },

      'empty route': function () {
        var url = router.match({ 
          route : {
{'fraction_non_alphanumeric': 0.1708029197080292, 'fraction_numerical': 0.0, 'mean_word_length': 2.506393861892583, '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': '7003011', 'n_tokens_mistral': 430, 'n_tokens_neox': 421, 'n_words': 104}