title: Babel module-resolver not working with Mocha tests
body: <p>I'm trying to run some React tests using Mocha. My react components have aliases via Babel's <code>"babel-plugin-module-resolver": "^3.1.1",</code>, they work, but they don't work when running tests.</p>
  
  <p>Here is the error when running testes:</p>
  
  <p><code>Error: Cannot find module 'Styles/dimensions'</code></p>
  
  <p>Here are my .babelrc configs:</p>
  
  <p><code>
  ...
    "plugins": [
      [ "module-resolver",
        {
          "root": ["."],
          "extensions": [".js", ".json", ".jsx", ".ts", ".tsx"],
          "alias": {
            "Styles": ["./app/react/styles"],
          }
        }
      ]
    ]
  ...
  </code></p>
  
  <p>My mocha-setup.js file includes:</p>
  
  <pre><code>require('moment');
  require('babel-plugin-module-resolver');
  require('babel-polyfill');
  require('babel-register')({
    only: /(node_modules\/|\.test.js)/,
  });
  require('ts-node').register({
    project: './app/tests/config/tsconfig.test.json',
  });
  
  require('./helpers');
  require('./browser');
  </code></pre>
  
  <p>Here is my command used to run the tests:</p>
  
  <p><code>cross-env  NODE_PATH=./ NODE_ENV=test mocha 'app/react/**/*.test.{js,jsx}'  --require ./app/tests/config/mocha-setup.js</code></p>
  
  <p>Any ideas on how to get Mocha to compile those aliases? The test run file without the alias, but Mocha doesn't seem to be running the alias compilation before running the tests.</p>