Encounter error when running mocha
<p>Below is the 'test' within script section in package.json</p>

<pre><code>"test": "mocha tests/test.js --compilers js:babel-core/register --recursive",
</code></pre>

<p>Below is the source code of tests/test.js.</p>

<pre><code>// Mocking window and document object:
require('./dom-mock')('&lt;html&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;');

var jsdom = require('mocha-jsdom');
var assert = require('assert');
var React = require('react');
var TestUtils = require('react-addons-test-utils');

describe('Testing my div', function() {
  jsdom({ skipWindowCheck: true });

  it('should contain text: Lovely! Here it is - my very first React component!', function() {
    var VeryFirstDiv = require('../source/containers/Component.js');

    var myDiv = TestUtils.renderIntoDocument(
      &lt;VeryFirstDiv /&gt;
    );

    var divText = TestUtils.findRenderedDOMComponentWithTag(
      myDiv, 'span');

    assert.equal(divText.textContent, 'Lovely! Here it is - my very first React component!');
  });
});
</code></pre>

<p>Then I run 'npm test'. The following error was printed.</p>

<pre><code>  Testing my div
    1) should contain text: Lovely! Here it is - my very first React component!


  0 passing (50ms)
  1 failing

  1) Testing my div should contain text: Lovely! Here it is - my very first Reac
t component!:
     Error: locals[0] does not appear to be a `module` object with Hot Module re
placement API enabled. You should disable react-transform-hmr in production by u
sing `env` section in Babel configuration. See the example in README: https://gi
thub.com/gaearon/react-transform-hmr
      at Object.proxyReactComponents [as default] (C:\Users\e587214\Documents\wo
rkspace\SSC_CDT3_UI\ui\node_modules\react-transform-hmr\lib\index.js:51:11)
      at Object.&lt;anonymous&gt; (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui
\source\containers\Component.js:15:60)
      at normalLoader (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\node_
modules\babel-core\lib\api\register\node.js:199:5)
      at Object.require.extensions.(anonymous function) [as .js] (C:\Users\e5872
14\Documents\workspace\SSC_CDT3_UI\ui\node_modules\babel-core\lib\api\register\n
ode.js:216:7)
      at require (internal/module.js:12:17)
      at Context.&lt;anonymous&gt; (C:/Users/e587214/Documents/workspace/SSC_CDT3_UI/u
i/tests/test.js:13:24)
      at callFn (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\node_module
s\mocha\lib\runnable.js:315:21)
      at Test.Runnable.run (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\
node_modules\mocha\lib\runnable.js:308:7)
      at Runner.runTest (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\nod
e_modules\mocha\lib\runner.js:422:10)
      at C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\node_modules\mocha\
lib\runner.js:533:12
      at next (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\node_modules\
mocha\lib\runner.js:342:14)
      at C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\node_modules\mocha\
lib\runner.js:352:7
      at next (C:\Users\e587214\Documents\workspace\SSC_CDT3_UI\ui\node_modules\
mocha\lib\runner.js:284:14)
      at Immediate._onImmediate (C:\Users\e587214\Documents\workspace\SSC_CDT3_U
I\ui\node_modules\mocha\lib\runner.js:320:5)
</code></pre>

<p>I guess if this error relate to the parameter '<strong>js:babel-core/register</strong>' after mocha or the babal version. Below is part of my package.json.</p>

<pre><code> "devDependencies": {
    "babel": "^5.8.29",
    "babel-core": "^5.8.33",
    "babel-eslint": "^4.1.3",
    "babel-loader": "^5.3.2",
    "babel-plugin-react-transform": "^2.0.2",
    "chai": "^3.4.0",
    "jsdom": "^7.0.2",
    "mocha": "^2.3.3",
    "mocha-jsdom": "^1.0.0",
    "path-parse": "^1.0.5",
    "phantomjs": "^1.9.18"
  }
}
</code></pre>