<commit_before>/* global describe, it */
var chai = require('chai');
var config = require('./config');
var expect = chai.expect;
var drizzle = require('../dist/');

describe ('drizzle', () => {
  const options = config.fixtureOpts;
  it ('should return data',  () => {
    return drizzle(options).then(drizzleData => {
      expect(drizzleData.pages).to.be.an('object');
      expect(drizzleData.patterns).to.be.an('object');
      expect(drizzleData.options).to.be.an('object');
      // TODO deeper tests as we go
    });
  });
});<commit_msg>RimRaf at beginning of test runs<commit_after>/* global describe, it, before */
var chai = require('chai');
var config = require('./config');
var expect = chai.expect;
var drizzle = require('../dist/');
var Promise = require('bluebird');
var rimraf = Promise.promisify(require('rimraf'));

before (() => {
  // Delete all output files
  return rimraf(config.fixtureOpts.dest);
});
describe ('drizzle', () => {
  const options = config.fixtureOpts;
  it ('should return data',  () => {
    return drizzle(options).then(drizzleData => {
      expect(drizzleData.pages).to.be.an('object');
      expect(drizzleData.patterns).to.be.an('object');
      expect(drizzleData.options).to.be.an('object');
      // TODO deeper tests as we go
    });
  });
});
{'fraction_non_alphanumeric': 0.1901081916537867, 'fraction_numerical': 0.0, 'mean_word_length': 3.761029411764706, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '4758531', 'n_tokens_mistral': 435, 'n_tokens_neox': 421, 'n_words': 91}