<commit_before>
import DC from '../src/index.js'

/* global describe, it */

var chai = require('chai')

const assert = chai.assert

describe('DistinctColors', function () {
  it('Should handle excessively large palettes', function () {
    this.timeout(3000)
    assert.ok(DC({ count: 500, lightMin: 90, samples: 10000, quality: 100 }))
  })

  it('Should override sample setting if too low', function () {
    assert.ok(DC({ count: 40, lightMin: 90, samples: 10, quality: 10 }))
  })

  it('Should throw error if min is >= max.', function () {
    assert.throws(function () {
      DC({ count: 26, lightMin: 90, lightMax: 90 })
    }, 'lightMax must be greater than lightMin!')
  })
})<commit_msg>Test all counts up to 100 issue #16<commit_after>
import DC from '../src/index.js'

/* global describe, it */

var chai = require('chai')

const assert = chai.assert

describe('DistinctColors', function () {
  it('Should handle excessively large palettes', function () {
    this.timeout(3000)
    assert.ok(DC({ count: 500, lightMin: 90, samples: 10000, quality: 100 }))
  })

  it('Should override sample setting if too low', function () {
    assert.ok(DC({ count: 40, lightMin: 90, samples: 10, quality: 10 }))
  })

  it('Should throw error if min is >= max.', function () {
    assert.throws(function () {
      DC({ count: 26, lightMin: 90, lightMax: 90 })
    }, 'lightMax must be greater than lightMin!')
  })

  for (let i = 1; i <= 100; i += 1) {
    it(`Should work if {count:${i}}.`, function () {
      assert.ok(DC({ count: i, samples: 10 }))
    })
  }
})
{'fraction_non_alphanumeric': 0.16687898089171974, 'fraction_numerical': 0.04713375796178344, 'mean_word_length': 3.412921348314607, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '3251886', 'n_tokens_mistral': 578, 'n_tokens_neox': 498, 'n_words': 167}