var Mocha = require('mocha');
var decycle = require('cycle').decycle;

process.on('message', function (data) {
  'useColors' in data.options || (data.options.useColors = true);
  var mocha = new Mocha(data.options);

  mocha.addFile(data.file);
  data.setup && mocha.addFile(data.setup);

  console.log(data.file);

  mocha.run(function() {
    process.exit(0);
  }).on('suite end', function (suite) {
    if (suite.root) {
      process.send(decycle(suite));
    }
  });
});

var Mocha = require('mocha');
var decycle = require('cycle').decycle;

process.on('message', function (data) {
  'useColors' in data.options || (data.options.useColors = true);
  var mocha = new Mocha(data.options);

  data.setup && mocha.addFile(data.setup);
  mocha.addFile(data.file);

  console.log(data.file);

  mocha.run(function() {
    process.exit(0);
  }).on('suite end', function (suite) {
    if (suite.root) {
      process.send(decycle(suite));
    }
  });
});

Revert "fix: Results blob incorrectly identifying tests as part of setup file"
Revert "fix: Results blob incorrectly identifying tests as part of setup file"

This reverts commit 602507f9410e57727848ab1786f4822f177b0d56.
