title: Mocha Tests with Webpack Feature Flags
body: <p>we've been using webpack for a while now and recently started using feature flags:</p>
  
  <pre><code>plugins: [
      new webpack.DefinePlugin({ __DEV__: true })
  ],
  </code></pre>
  
  <p>We are using mocha for our unit tests:</p>
  
  <pre><code>"scripts": {
      "test": "mocha --compilers js:babel-register --check-leaks --throw-deprecation --recursive Source/test",
      "test:watch": "npm test -- --watch"
  },
  </code></pre>
  
  <p>The Problem is that mocha cannot handle them and I have found no way of faking them:</p>
  
  <pre><code>ReferenceError: __DEV__ is not defined
  </code></pre>
  
  <p>Is there any way to make this work?</p>
  
  <p>Any way to tell mocha to inject the flags the same way webpack does?</p>