<commit_before>var totalTestCount = 0;

if(!window._phantom){
  QUnit.log(function( details ) {
    console.log(details);
    console.log(details.module + ": " + details.name);
    if(details.result !== true){
      console.log("FAIL");
      console.log("   ---");
      console.log("    actual: -");
      console.log("      " + details.actual);
      console.log("    expected: -");
      console.log("      " + details.expected);
      console.log("    message: -");
      console.log("      " + details.message);
      console.log("    Log: >");
      if(details.log){
        console.log("      " + details.log);
      }
    }
  });

  QUnit.done(function( details ){
    console.log("TEST SUMMARY:");
    console.log("PASSED: " + details.passed);
    console.log("FAILED: " + details.failed);
    console.log("TOTAL: " + details.total);
    console.log("Runtime: " + details.runtime + "ms");

    var gui = require('nw.gui');
    if(details.failed === 0){
      // quit with no error
      gui.App.quit();
    }
    else{
      // fail out
      gui.App.crashRenderer();
    }
  });
}<commit_msg>add stack information to failures<commit_after>// dead stupid script to format test output from nw.js to the console
var totalTestCount = 0;

if(!window._phantom){
  QUnit.log(function( details ) {
    console.log(details);
    console.log(details.module + ": " + details.name);
    if(details.result !== true){
      console.log("FAIL");
      console.log("   ---");
      console.log("    actual: -");
      console.log("      " + details.actual);
      console.log("    expected: -");
      console.log("      " + details.expected);
      console.log("    message: -");
      console.log("      " + details.message);
      console.log("      " + details.source);
      console.log("    Log:");
      if(details.log){
        console.log("      " + details.log);
      }
    }
  });

  QUnit.done(function( details ){
    console.log("TEST SUMMARY:");
    console.log("PASSED: " + details.passed);
    console.log("FAILED: " + details.failed);
    console.log("TOTAL: " + details.total);
    console.log("Runtime: " + details.runtime + "ms");

    var gui = require('nw.gui');
    if(details.failed === 0){
      // quit with no error
      gui.App.quit();
    }
    else{
      // fail out
      gui.App.crashRenderer();
    }
  });
}
{'fraction_non_alphanumeric': 0.18461538461538463, 'fraction_numerical': 0.0017094017094017094, 'mean_word_length': 2.220082530949106, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 4, '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': '5424116', 'n_tokens_mistral': 762, 'n_tokens_neox': 732, 'n_words': 133}