<commit_before>const describe = require('mocha').describe
const it = require('mocha').it
const assert = require('chai').assert

const Validator = require('./Validator')

describe('Validator', function () {
  describe('Email', function () {
    it('should validate an email address', function () {
      assert.isTrue(Validator.isEmail('<EMAIL>'))
    })

    it('should require a username', function () {
      assert.isNotTrue(Validator.isEmail('@example'))
    })

    it('should require a domain', function () {
      assert.isNotTrue(Validator.isEmail('johndoe'))
    })

    it('should require a tld', function () {
      assert.isNotTrue(Validator.isEmail('johndoe.example'))
    })

    it('should allow a full stop', function () {
      assert.isTrue(Validator.isEmail('<EMAIL>'))
    })

    it('should validate with a dash', function () {
      assert.isTrue(Validator.isEmail('<EMAIL>'))
    })

    it('should validate with a plus sign', function () {
      assert.isTrue(Validator.isEmail('<EMAIL>'))
    })

    it('should validate with a uppercase letters', function () {
      assert.isTrue(Validator.isEmail('<EMAIL>'))
    })

    it('should not allow a space', function () {
      assert.isNotTrue(Validator.isEmail('john <EMAIL>'))
    })
  })
  describe('Website', function () {
    it('should validate a http website', function () {
      assert.isTrue(Validator.isWebsite('http://example.com'))
    })

    it('should validate a https website', function () {
      assert.isTrue(Validator.isWebsite('https://example.com'))
    })

    it('should validate without a protocol', function () {
      assert.isTrue(Validator.isWebsite('example.com'))
    })

    it('should require a domain', function () {
      assert.isNotTrue(Validator.isWebsite('https://'))
    })

    it('should require a tld', function () {
      assert.isNotTrue(Validator.isWebsite('https://example'))
    })
  })
})<commit_msg>remove describe nesting from Validator<commit_after>const describe = require('mocha').describe
const it = require('mocha').it
const assert = require('chai').assert

const Validator = require('./Validator')

describe('Validator', function () {
  it('should validate an email address', function () {
    assert.isTrue(Validator.isEmail('<EMAIL>'))
  })

  it('should require emails have a username', function () {
    assert.isNotTrue(Validator.isEmail('@example'))
  })

  it('should require emails have a domain', function () {
    assert.isNotTrue(Validator.isEmail('johndoe'))
  })

  it('should require emails have a tld', function () {
    assert.isNotTrue(Validator.isEmail('johndoe.example'))
  })

  it('should allow emails with a full stop', function () {
    assert.isTrue(Validator.isEmail('<EMAIL>'))
  })

  it('should allow emails with a dash', function () {
    assert.isTrue(Validator.isEmail('<EMAIL>'))
  })

  it('should allow emails with a plus sign', function () {
    assert.isTrue(Validator.isEmail('<EMAIL>'))
  })

  it('should allow emails with uppercase letters', function () {
    assert.isTrue(Validator.isEmail('<EMAIL>'))
  })

  it('should not allow emails with a space', function () {
    assert.isNotTrue(Validator.isEmail('john <EMAIL>'))
  })

  it('should validate a http website', function () {
    assert.isTrue(Validator.isWebsite('http://example.com'))
  })

  it('should validate a https website', function () {
    assert.isTrue(Validator.isWebsite('https://example.com'))
  })

  it('should validate a website without a protocol', function () {
    assert.isTrue(Validator.isWebsite('example.com'))
  })

  it('should require a website domain', function () {
    assert.isNotTrue(Validator.isWebsite('https://'))
  })

  it('should require a website tld', function () {
    assert.isNotTrue(Validator.isWebsite('https://example'))
  })
})
{'fraction_non_alphanumeric': 0.16456361724500526, 'fraction_numerical': 0.0, 'mean_word_length': 3.8657289002557547, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 6, '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': '1520813', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1085, 'n_words': 244}