<commit_before>var test = require('tap').test

var normalize = require('../normalize-git-url.js')

test('basic normalization tests', function (t) {
  t.same(
    normalize('git+ssh://user@hostname:project.git#commit-ish'),
    { url: 'user@hostname:project.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+http://user@hostname/project/blah.git#commit-ish'),
    { url: 'http://user@hostname/project/blah.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+https://user@hostname/project/blah.git#commit-ish'),
    { url: 'https://user@hostname/project/blah.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+ssh://git@github.com:npm/npm.git#v1.0.27'),
    { url: 'git@github.com:npm/npm.git', branch: 'v1.0.27' }
  )
  t.same(
    normalize('git+ssh://git@github.com:org/repo#dev'),
    { url: 'git@github.com:org/repo', branch: 'dev' }
  )
  t.same(
    normalize('git+ssh://git@github.com/org/repo#dev'),
    { url: 'ssh://git@github.com/org/repo', branch: 'dev' }
  )
  t.same(
    normalize('git+ssh://foo:22/some/path'),
    { url: 'ssh://foo:22/some/path', branch: 'master' }
  )
  t.same(
    normalize('git@github.com:org/repo#dev'),
    { url: 'git@github.com:org/repo', branch: 'dev' }
  )
  t.same(
    normalize('git+https://github.com/KenanY/node-uuid'),
    { url: 'https://github.com/KenanY/node-uuid', branch: 'master' }
  )
  t.same(
    normalize('git+https://github.com/KenanY/node-uuid#7a018f2d075b03a73409e8356f9b29c9ad4ea2c5'),
    { url: 'https://github.com/KenanY/node-uuid', branch: '7a018f2d075b03a73409e8356f9b29c9ad4ea2c5' }<commit_msg>failing test for bad http(s) urls that were previously passed through<commit_after>var test = require('tap').test

var normalize = require('../normalize-git-url.js')

test('basic normalization tests', function (t) {
  t.same(
    normalize('git+ssh://user@hostname:project.git#commit-ish'),
    { url: 'user@hostname:project.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+http://user@hostname/project/blah.git#commit-ish'),
    { url: 'http://user@hostname/project/blah.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+https://user@hostname/project/blah.git#commit-ish'),
    { url: 'https://user@hostname/project/blah.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+https://user@hostname:project/blah.git#commit-ish'),
    { url: 'https://user@hostname:project/blah.git', branch: 'commit-ish' }
  )
  t.same(
    normalize('git+ssh://git@github.com:npm/npm.git#v1.0.27'),
    { url: 'git@github.com:npm/npm.git', branch: 'v1.0.27' }
  )
  t.same(
    normalize('git+ssh://git@github.com:org/repo#dev'),
    { url: 'git@github.com:org/repo', branch: 'dev' }
  )
  t.same(
    normalize('git+ssh://git@github.com/org/repo#dev'),
    { url: 'ssh://git@github.com/org/repo', branch: 'dev' }
  )
  t.same(
    normalize('git+ssh://foo:22/some/path'),
    { url: 'ssh://foo:22/some/path', branch: 'master' }
  )
  t.same(
    normalize('git@github.com:org/repo#dev'),
    { url: 'git@github.com:org/repo', branch: 'dev' }
  )
  t.same(
    normalize('git+https://github.com/KenanY/node-uuid'),
    { url: 'https://github.com/KenanY/node-uuid', branch: 'master' }
  )
  t.same(
    normalize('git+https://github.com/KenanY/node-uuid#7a018f2d075b03a73409e8356f9b29c9ad4ea2c5'),
    { url: 'https://github.com/KenanY/node-uuid', branch: '7a018f2d075b03a73409e8356f9b29c9ad4ea2c5' }
{'fraction_non_alphanumeric': 0.21365767878077374, 'fraction_numerical': 0.03751465416178194, 'mean_word_length': 3.8138222849083214, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 16, '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': '7169028', 'n_tokens_mistral': 1462, 'n_tokens_neox': 1387, 'n_words': 158}