title: RequireJS replacing Node's Require method
body: <p>I'm running into an issue where node's require method has been replaced by requirejs' require method. We're running a backbone app and I've set up some mocha tests. The goal was to be able to run the tests in the browser, and also use grunt-mocha-test and run them in terminal on every build with grunt-contrib-watch.</p>
  
  <p>I don't fully yet understand how all these pieces fit together, so please forgive any lack of explanation, understanding.</p>
  
  <p>This is the set up of one of our test files, models.js:</p>
  
  <pre><code>describe("Models", function() {
  
    var should;
    var firstModule = 'models/firstModel';
    var secondModule = 'models/secondModel';
    var chaiModule = 'chai';
  
    modules = [
      firstModule,
      secondModule,
      chaiModule
    ];
  
    before(function(done) {
      require(modules, function(firstModel, secondModel, chai){
        FirstModel = eventModel;
        SecondModel = eventDetailsModel;
        should = chai.should();
        done();
      });
    });
  
    beforeEach(function(done) {
      NewFirstModel = new FirstModel();
      NewSecondModel = new SecondModel();
      done();
    });
  
    describe("first model", function() {
  
      it("should exist", function (done) {
        NewFirstModel.should.exist();
        done();
      });
    });
  });
  </code></pre>
  
  <p>Using grunt-contrib-requirejs with these settings:</p>
  
  <pre><code>compile:
    options:
      baseUrl: "&lt;%= tmpDir %&gt;/scripts"
      mainConfigFile: "&lt;%= tmpDir %&gt;/scripts/init.js"
      name: "../../bower_components/almond/almond"
      out: "&lt;%= distDir %&gt;/scripts/app.js"
      preserveLicenseComments: false
      cjsTranslate: true
      wrapShim: true
      uglify:
        ascii_only: true
  </code></pre>
  
  <p>The mochaTest grunt task:</p>
  
  <pre><code>test:
    options:
      reporter: 'spec',
    src: ['app/test/*.js']
  </code></pre>
  
  <p>I've got a test.html file which includes each individual test file and properly tests everything I throw at them.</p>
  
  <p>However, when I run the mochaTest grunt task, which points to the same test files, I get the following error:</p>
  
  <pre><code>AssertionError: path must be a string
  </code></pre>
  
  <p>referring to this line in models.js:</p>
  
  <pre><code>require(modules, function(firstModel, secondModel, chai){
  </code></pre>
  
  <p>If I console log the require method, it comes back as RequireJS' require method. I've tried a few different things, including setting <code>nodeRequire: require</code> in the init.js file referenced in the requirejs config. Any clues? Thanks!!!</p>