<commit_before>var vm = require('vm');
var fs = require('fs');

// this is the context in which all of our test code will run
var initSandbox = {
  console: console,
  require: require,
  setTimeout: setTimeout,
  clearTimeout: clearTimeout,
  Buffer: Buffer
};

var context = vm.createContext(initSandbox);

if(!process.argv[2]) {
  console.log('No makeCouch.js specified');
  process.exit(1);
}

fs.readFile('../browser/qunit/qunit/qunit.js', 'utf-8', function(err, data) {
  if(err) {
    throw err;
  }

  vm.runInContext(data, context);

  fs.readFile('../../sag.js', 'utf-8', function(err, data) {
    if(err) {
      throw err;
    }

    vm.runInContext(data, context);

    fs.readFile(process.argv[2], 'utf-8', function(err, data) {
      vm.runInContext(data, context);

      fs.readFile('../sag-tests.js', 'utf-8', function(err, data) {
        if(err) {
          throw err;
        }

        vm.runInContext(data, context);
      });
    });
  });
});<commit_msg>Make it clear which makeCouch we're using<commit_after>var vm = require('vm');
var fs = require('fs');

// this is the context in which all of our test code will run
var initSandbox = {
  console: console,
  require: require,
  setTimeout: setTimeout,
  clearTimeout: clearTimeout,
  Buffer: Buffer
};

var context = vm.createContext(initSandbox);

if(!process.argv[2]) {
  console.log('No makeCouch.js specified');
  process.exit(1);
}
else {
  console.log('Using ' + process.argv[2]);
}

fs.readFile('../browser/qunit/qunit/qunit.js', 'utf-8', function(err, data) {
  if(err) {
    throw err;
  }

  vm.runInContext(data, context);

  fs.readFile('../../sag.js', 'utf-8', function(err, data) {
    if(err) {
      throw err;
    }

    vm.runInContext(data, context);

    fs.readFile(process.argv[2], 'utf-8', function(err, data) {
      vm.runInContext(data, context);

      fs.readFile('../sag-tests.js', 'utf-8', function(err, data) {
        if(err) {
          throw err;
        }

        vm.runInContext(data, context);
      });
    });
  });
});
{'fraction_non_alphanumeric': 0.176153091265947, 'fraction_numerical': 0.007360157016683023, 'mean_word_length': 2.951550387596899, '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': '6673093', 'n_tokens_mistral': 731, 'n_tokens_neox': 717, 'n_words': 153}