'use strict';

var to5 = require('6to5-core');
var ReactTools = require('react-tools');

module.exports = {
  process: function(src, filename) {
    if (filename.match(/\.jsx$/)) {
      // Match JSX
      return ReactTools.transform('/**@jsx React.DOM*/' + src, {
        harmony: true
      });
    }
    // Allow the stage to be configured by an environment
    // variable, but use Babel's default stage (2) if
    // no environment variable is specified.
    var stage = process.env.BABEL_JEST_STAGE || 2;

    // Ignore all files within node_modules
    // babel files can be .js, .es, .jsx or .es6
    if (filename.indexOf("node_modules") === -1 && babel.canCompile(filename)) {
      return babel.transform(src, {
        filename: filename,
        stage: stage,
        retainLines: true
      }).code;
    }

    return src;
  }
};
'use strict';

var ReactTools = require('react-tools');
var babel = require("babel-core");

module.exports = {
  process: function(src, filename) {
    if (filename.match(/\.jsx$/)) {
      // Match JSX
      return ReactTools.transform('/**@jsx React.DOM*/' + src, {
        harmony: true
      });
    }
    // Allow the stage to be configured by an environment
    // variable, but use Babel's default stage (2) if
    // no environment variable is specified.
    var stage = process.env.BABEL_JEST_STAGE || 2;

    // Ignore all files within node_modules
    // babel files can be .js, .es, .jsx or .es6
    if (filename.indexOf("node_modules") === -1 && babel.canCompile(filename)) {
      return babel.transform(src, {
        filename: filename,
        stage: stage,
        retainLines: true
      }).code;
    }

    return src;
  }
};
Change to babel.