<commit_before>'use strict';
var chai = require('chai');
var expect = chai.expect;
var isGithubUrl = require('../index.js');
var options;

var urls = [
  'https://github.com/facebook/react',
  'https://github.com/facebook/react/tree/0.14-stable',
  'https://github.com/facebook/react/releases/tag/v0.14.0'
];

var cloningUrls = [
  'git://github.com/facebook/react.git#gh-pages',
  'git@github.com:facebook/react.git',
  'https://github.com/facebook/react.git',
  'git://github.com:user/some_project.git.git'
];

var invalidUrls = [
  'github.com/facebook/react',
  'www.github.com/facebook/react',
  'google.com',
  'https://google.com',
  'https://hello.github.com',
  'unknown://github.com',
  'http://facebook.github.io/',
  'git@github.com:facebook/react.git/foo',
  'git@github.com:user/some_project.gitfoo',
  'git://github.com:user/some_project.gitfoo',
  'git://github.com:user/some_project',
  'git@github.com:facebook/react/facebook.git'
];

describe('is-github-url', function() {
  describe('with a standart set of options', function() {

    urls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be valid', function () {
        expect(isGithubUrl(url)).to.be.true;
      });
    });

    cloningUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be valid', function () {
        expect(isGithubUrl(url)).to.be.true;
      });
    });

    invalidUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be invalid', function () {
        expect(isGithubUrl(url)).to.be.false;
      });
    });

  });

  describe('with enabled strict mode', function() {

    before(function() {
      options = { strict: true };
    });

    urls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be invalid', function () {
        expect(isGithubUrl(url, options)).to.be.false;
      });
    });

    cloningUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be valid', function () {
        expect(isGithubUrl(url, options)).to.be.true;
      });
    });

    invalidUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be invalid', function () {
        expect(isGithubUrl(url, options)).to.be.false;
      });
    });

  });
});
<commit_msg>Linting<commit_after>'use strict';
var chai = require('chai');
var expect = chai.expect;
var isGithubUrl = require('../index.js');
var options;

var urls = [
  'https://github.com/facebook/react',
  'https://github.com/facebook/react/tree/0.14-stable',
  'https://github.com/facebook/react/releases/tag/v0.14.0'
];

var cloningUrls = [
  'git://github.com/facebook/react.git#gh-pages',
  'git@github.com:facebook/react.git',
  'https://github.com/facebook/react.git',
  'git://github.com:user/some_project.git.git'
];

var invalidUrls = [
  'github.com/facebook/react',
  'www.github.com/facebook/react',
  'google.com',
  'https://google.com',
  'https://hello.github.com',
  'unknown://github.com',
  'http://facebook.github.io/',
  'git@github.com:facebook/react.git/foo',
  'git@github.com:user/some_project.gitfoo',
  'git://github.com:user/some_project.gitfoo',
  'git://github.com:user/some_project',
  'git<EMAIL>:facebook/react/facebook.git'
];

describe('is-github-url', function() {
  describe('with a standart set of options', function() {

    urls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be valid', function() {
        expect(isGithubUrl(url)).to.be.true;
      });
    });

    cloningUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be valid', function() {
        expect(isGithubUrl(url)).to.be.true;
      });
    });

    invalidUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be invalid', function() {
        expect(isGithubUrl(url)).to.be.false;
      });
    });

  });

  describe('with enabled strict mode', function() {

    before(function() {
      options = { strict: true };
    });

    urls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be invalid', function() {
        expect(isGithubUrl(url, options)).to.be.false;
      });
    });

    cloningUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be valid', function() {
        expect(isGithubUrl(url, options)).to.be.true;
      });
    });

    invalidUrls.forEach(function(url) {
      it('URL' + ' - ' + url + ' should be invalid', function() {
        expect(isGithubUrl(url, options)).to.be.false;
      });
    });

  });
});

{'fraction_non_alphanumeric': 0.20466786355475763, 'fraction_numerical': 0.0031418312387791743, 'mean_word_length': 2.930335097001764, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 7, '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': '172497', 'n_tokens_mistral': 1586, 'n_tokens_neox': 1553, 'n_words': 214}