<commit_before>/*global describe, it */

'use strict';

var expect =  require('chai').expect
  , normalize = require('../lib/svn-project-root').normalize;

describe('svn-project-root.normalize', function() {

  it('should chop away `trunk`', function() {
    var actual = normalize('http://foobar.com/fldr/trunk/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should chop away `branches`', function() {
    var actual = normalize('http://foobar.com/fldr/branches/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should chop away `tags`', function() {
    var actual = normalize('http://foobar.com/fldr/tags/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should chop at first occurrance of `trunk|branches|tags`', function() {
    expect(normalize('http://foobar.com/trunk/branches/tags/blargus'))
      .to.equal('http://foobar.com/fldr');
    expect(normalize('http://foobar.com/branches/trunk/tags/blargus'))
      .to.equal('http://foobar.com/fldr');
    expect(normalize('http://foobar.com/tags/branches/trunk/blargus'))
      .to.equal('http://foobar.com/fldr');
  });

  it('should filter out auth creds (username only)', function() {
    var actual = normalize('http://jtrussell@foobar.com/fldr/trunk/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should filter out creds (username + pw)', function() {
    var actual = normalize('http://jtrussell:secret@foobar.com/fldr');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

});
<commit_msg>"First occurrance of" tests missing directory name<commit_after>/*global describe, it */

'use strict';

var expect =  require('chai').expect
  , normalize = require('../lib/svn-project-root').normalize;

describe('svn-project-root.normalize', function() {

  it('should chop away `trunk`', function() {
    var actual = normalize('http://foobar.com/fldr/trunk/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should chop away `branches`', function() {
    var actual = normalize('http://foobar.com/fldr/branches/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should chop away `tags`', function() {
    var actual = normalize('http://foobar.com/fldr/tags/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should chop at first occurrance of `trunk|branches|tags`', function() {
    expect(normalize('http://foobar.com/fldr/trunk/branches/tags/blargus'))
      .to.equal('http://foobar.com/fldr');
    expect(normalize('http://foobar.com/fldr/branches/trunk/tags/blargus'))
      .to.equal('http://foobar.com/fldr');
    expect(normalize('http://foobar.com/fldr/tags/branches/trunk/blargus'))
      .to.equal('http://foobar.com/fldr');
  });

  it('should filter out auth creds (username only)', function() {
    var actual = normalize('http://jtrussell@foobar.com/fldr/trunk/blargus');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

  it('should filter out creds (username + pw)', function() {
    var actual = normalize('http://jtrussell:secret@foobar.com/fldr');
    expect(actual).to.equal('http://foobar.com/fldr');
  });

});

{'fraction_non_alphanumeric': 0.2028415961305925, 'fraction_numerical': 0.0, 'mean_word_length': 3.5204918032786887, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '1321898', 'n_tokens_mistral': 1230, 'n_tokens_neox': 1141, 'n_words': 158}