<commit_before>/* global it */

var assert = require('assert')
var p = require('..')

// The spec is unclear about tabs and newlines
it('forbids tabs and newlines', function () {
  assert.throws(function () { return p('MIT\t') })
  assert.throws(function () { return p('\nMIT') })
})

it('allows many spaces', function () {
  assert.deepEqual(
    p(' MIT'),
    {license: 'MIT'}
  )

  assert.deepEqual(
    p('MIT '),
    {license: 'MIT'}
  )

  assert.deepEqual(
    p('MIT  AND    BSD-3-Clause'),
    {
      left: {license: 'MIT'},
      conjunction: 'and',
      right: {license: 'BSD-3-Clause'}
    }
  )
})

it('forbids spaces between a license-id and a following `+`', function () {
  assert.throws(
    function () { return p('MIT +') },
    /Space before `\+`/
  )
})
<commit_msg>Remove useless `return` statements in tests<commit_after>/* global it */

var assert = require('assert')
var p = require('..')

// The spec is unclear about tabs and newlines
it('forbids tabs and newlines', function () {
  assert.throws(function () { p('MIT\t') })
  assert.throws(function () { p('\nMIT') })
})

it('allows many spaces', function () {
  assert.deepEqual(
    p(' MIT'),
    {license: 'MIT'}
  )

  assert.deepEqual(
    p('MIT '),
    {license: 'MIT'}
  )

  assert.deepEqual(
    p('MIT  AND    BSD-3-Clause'),
    {
      left: {license: 'MIT'},
      conjunction: 'and',
      right: {license: 'BSD-3-Clause'}
    }
  )
})

it('forbids spaces between a license-id and a following `+`', function () {
  assert.throws(
    function () { p('MIT +') },
    /Space before `\+`/
  )
})

{'fraction_non_alphanumeric': 0.1923318667504714, 'fraction_numerical': 0.00251414204902577, 'mean_word_length': 2.836144578313253, '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': '6089738', 'n_tokens_mistral': 559, 'n_tokens_neox': 550, 'n_words': 138}