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

var testrunner = require( "qunit" ),

path = require( "path" ).normalize( __dirname + "/.." );
    
testrunner.setup({

});

var mockserver = require("./mockserver").app;

mockserver.listen(30045);

testrunner.run([
        {
            code: path + "/lib/crawler.js",
            tests: [
             path + "/test/units/simple.js",
              path + "/test/units/links.js",
             
              path + "/test/units/forceutf8.js",
              
              path + "/test/units/errors.js",
             
              path + "/test/units/leaks.js"
  
            ]
        }
],function() {
  console.log("Stopping mockserver...");
  mockserver.close();
});<commit_msg>exit with status 1 on failed tests<commit_after>#!/usr/bin/env node

var testrunner = require( "qunit" ),

path = require( "path" ).normalize( __dirname + "/.." );
    
testrunner.setup({

});

var mockserver = require("./mockserver").app;

mockserver.listen(30045);

testrunner.run([
        {
            code: path + "/lib/crawler.js",
            tests: [
             path + "/test/units/simple.js",
              path + "/test/units/links.js",
             
              path + "/test/units/forceutf8.js",
              
              path + "/test/units/errors.js",
             
              path + "/test/units/leaks.js"
  
            ]
        }
],function(err, report) {
  console.log("Stopping mockserver...");
  mockserver.close();
  process.exit((err || report.failed !== 0) ? 1 : 0);
});
{'fraction_non_alphanumeric': 0.1725721784776903, 'fraction_numerical': 0.010498687664041995, 'mean_word_length': 1.6521739130434783, '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': '7204987', 'n_tokens_mistral': 486, 'n_tokens_neox': 481, 'n_words': 82}