title: require.context not a function when trying to run Mocha tests
body: <p>I'm trying to run tests using the <code>Mocha.js</code> + <code>JSDOM</code> frameworks, but I'm having trouble getting <code>Mocha</code> to start up. This is in the process of testing a <code>React</code> app using the <code>Vue.js</code> library. I keep getting the following error:</p>
  
  <pre><code>var req = require.context('./', false, /\.vue$/);
  TypeError: require.context is not a function
  </code></pre>
  
  <p>The code in question is: </p>
  
  <pre><code>let req = require.context('./', false, /\.vue$/);
  components.forEach(function (component) {
      try {
          let filePath = './' + component + '.vue';
          let injected = inject(req(filePath));
          Vue.component(getComponentName(component), injected);
  
          let appComponent = {
              name: injected.name,
              props: {
                  autocompletion: {
                      metadata: getComponentName('template'),
                      score: xTemplatesScore,
                      attributes: injected.props || []
                  }
              }
          };
  
          appComponents.push(appComponent);
  
      } catch (err) {
          console.log(err);
          console.error('Vue file was not found for component:' + component + '. Please rename your files accordingly ( component-name.vue )');
      }
  </code></pre>
  
  <p>Is there a way to get around this and actually get <code>Mocha</code> to start up? Or is there a suitable replacement for <code>require.context</code>? I've tried to redo it with just plain string concatenations and a vanilla <code>require</code>, but that keeps telling me that none of the <code>Vue</code> modules can be found.</p>