<commit_before>#!/usr/bin/env node

var path = require('path');
var fs = require('fs');
var spawn = require('child_process').spawn;
var async = require('async');

const ENV = {
  NODE_ENV: 'test',
  OPENBADGER_MONGO_HOST: 'localhost',
  OPENBADGER_MONGO_PORT: '27017',
  OPENBADGER_MONGO_DB: 'openbadger_test'
};

const USAGE = [
  'Usage: $0 [options] [test-filenames]',
  '',
  'If no test filenames are provided, all tests will be run.',
  '',
  'Tests use localhost mongodb with the ' + ENV.OPENBADGER_MONGO_DB + ' db.'
];

var cmdline = require('optimist')
  .usage(USAGE.join('\n'))
  .options('f', {
    alias: 'filter',
    desc: 'filter test files by regexp'
  })
  .options('d', {
    alias: 'debug',
    type: 'boolean',
    desc: 'enable debug output'
  })
  .options('h', {
    alias: 'help',
    type: 'boolean',
    desc: 'show help'
  });

if (cmdline.argv.help) {
  cmdline.showHelp();
  process.exit(0);
}<commit_msg>cleared out a bunch of env vars in tests to ensure they work properly.<commit_after>#!/usr/bin/env node

var path = require('path');
var fs = require('fs');
var spawn = require('child_process').spawn;
var async = require('async');

const ENV = {
  NODE_ENV: 'test',
  OPENBADGER_MONGO_HOST: 'localhost',
  OPENBADGER_MONGO_PORT: '27017',
  OPENBADGER_MONGO_DB: 'openbadger_test',
  OPENBADGER_HOST: '',
  OPENBADGER_PROTOCOL: '',
  OPENBADGER_PORT: '',
  OPENBADGER_PERSONA_AUDIENCE: '',
  OPENBADGER_REDIS_HOST: '',
  OPENBADGER_REDIS_PORT: ''
};

const USAGE = [
  'Usage: $0 [options] [test-filenames]',
  '',
  'If no test filenames are provided, all tests will be run.',
  '',
  'Tests use localhost mongodb with the ' + ENV.OPENBADGER_MONGO_DB + ' db.'
];

var cmdline = require('optimist')
  .usage(USAGE.join('\n'))
  .options('f', {
    alias: 'filter',
    desc: 'filter test files by regexp'
  })
  .options('d', {
    alias: 'debug',
    type: 'boolean',
    desc: 'enable debug output'
  })
  .options('h', {
    alias: 'help',
    type: 'boolean',
    desc: 'show help'
  });

if (cmdline.argv.help) {
  cmdline.showHelp();
  process.exit(0);
}
{'fraction_non_alphanumeric': 0.17152412804586717, 'fraction_numerical': 0.006688963210702341, 'mean_word_length': 3.8137931034482757, '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': '1485376', 'n_tokens_mistral': 810, 'n_tokens_neox': 781, 'n_words': 185}