<commit_before>var fs = require( 'fs' );
var yargs = require( "yargs" );
var args = yargs.argv;

if ( !args.config || !fs.existsSync( args.config ) ) {
  console.log( "Please specify a modepress --config file to use in the command line" );
  process.exit();
}

if ( args.server === undefined || isNaN( parseInt( args.server ) ) ) {
  console.log( "Please specify a --server index in the cmd arguments to test. This index refers to the array item in the modepress config.servers array" );
  process.exit();
}

const startup = require( '../dist/core/initialization/startup.js' );
const header = require( './tests/header.js' );

// Start the first test to initialize everything
describe( 'Initializing tests', function() {

  before( async function() {
    try {
      // Initialize the server
      await startup.initialize();
    }
    catch ( err ) {
      console.error( err );
      process.exit();
    }

    // Initialize the test suites
    await header.initialize();
  } );

  it( 'should be initialized', function( done ) {
    return done();
  } );
} );
<commit_msg>Allow for greater leniency on startup<commit_after>var fs = require( 'fs' );
var yargs = require( "yargs" );
var args = yargs.argv;

if ( !args.config || !fs.existsSync( args.config ) ) {
  console.log( "Please specify a modepress --config file to use in the command line" );
  process.exit();
}

if ( args.server === undefined || isNaN( parseInt( args.server ) ) ) {
  console.log( "Please specify a --server index in the cmd arguments to test. This index refers to the array item in the modepress config.servers array" );
  process.exit();
}

const startup = require( '../dist/core/initialization/startup.js' );
const header = require( './tests/header.js' );

// Start the first test to initialize everything
describe( 'Initializing tests', function() {

  before( async function() {
    this.timeout( 20000 );

    try {
      // Initialize the server
      await startup.initialize();
    }
    catch ( err ) {
      console.error( err );
      process.exit();
    }

    // Initialize the test suites
    await header.initialize();
  } );

  it( 'should be initialized', function( done ) {
    return done();
  } );
} );

{'fraction_non_alphanumeric': 0.1409090909090909, 'fraction_numerical': 0.0022727272727272726, 'mean_word_length': 3.0534069981583793, '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': '2916907', 'n_tokens_mistral': 652, 'n_tokens_neox': 647, 'n_words': 221}