title: Import node module into front end mocha unit test
body: <p>I have a node server which serves some json models to a javascript front end. </p>
  
  <p>The json models are defined in a module and use module.exports to expose the json object.</p>
  
  <p>The front end code is using requirejs. </p>
  
  <p>Is it possible to import the module into my mocha tests so that I can use the json object defined in the module as my test fixture.</p>
  
  <pre><code>define(['{path to fixtures}'], function (fixtures) {
      describe('My Tests', function () {
          var components = fixtures.components;
          ...........
      });
  });
  </code></pre>
  
  <p>If I use the above in my mocha test spec I am getting the below error: </p>
  
  <blockquote>
    <p>ReferenceError: Can't find variable: module</p>
  </blockquote>
  
  <p>So it is finding the file but not able to use it.</p>
  
  <p>If this is possible how can I do it?</p>
  
  <p>Thanks for looking!</p>