title: Karma Require.js -- changing directory structure is killing everything
body: <p>I've been trying to set up karma to work with Require.js now for a few days (and then later use require with angular) and it's been amazingly frustrating. Here's what my file tree looks like for this example:</p>
  
  <pre><code>$ tree
  .
  |-- public
  |   |-- index.html
  |   |-- src
  |       |-- app.js
  |       `-- main.js
  |-- config
  |   |-- karma.conf.js  
  |-- lib
  |   |-- jquery.js
  |   |-- require.js
  |   `-- underscore.js
  |-- src
  |   |-- app.js
  |   `-- main.js
  `-- test
      |-- appSpec.js
      `-- test-main.js
  </code></pre>
  
  <h2>note:</h2>
  
  <p>This repository I'm working on is a clone of the one used in the <a href="http://karma-runner.github.io/0.8/plus/RequireJS.html" rel="noreferrer">karma requirejs example</a> . The ONLY difference between the <a href="https://github.com/kjbekkelund/karma-requirejs" rel="noreferrer">karma example githubs' code</a> and my code are the 3 changes to the file directory structure:</p>
  
  <ol>
  <li><p>/karma.conf.js      </p>
  
  <pre><code>    ==&gt; /config/karma.conf.js
  </code></pre></li>
  <li><p>/src/               </p>
  
  <pre><code>    ==&gt; /public/src/
  </code></pre></li>
  <li><p>/index.html         </p>
  
  <pre><code>    ==&gt; /public/index.html
  </code></pre></li>
  </ol>
  
  <p>So. Right now in order to get everything working, it would make sense that you would have to:</p>
  
  <ol>
  <li>run karma from within the conf directory, </li>
  <li><p>in the karma.conf.js file change:</p>
  
  <pre><code>basePath: '',
  </code></pre>
  
  <p>to </p>
  
  <pre><code>basePath: '../',
  </code></pre></li>
  <li><p>and in the test/test-main.js (which is the requirejs.config file) change:</p></li>
  </ol>
  
  <p>requirejs.config({</p>
  
  <pre><code>// Karma serves files from '/base' 
  baseUrl: '/base/src',
  </code></pre>
  
  <p>to</p>
  
  <pre><code>requirejs.config({
      // Karma serves files from '/base'
      baseUrl: '../base/src',
  </code></pre>
  
  <p>but it appears that no matter what I do I continue to get the same error:</p>
  
  <pre><code>ERROR: 'There is no timestamp for /base/src/app.js!'
  Uncaught Error: Script error for: app
  http://requirejs.org/docs/errors.html#scripterror
  at /node_modules/requirejs/require.js:141
  </code></pre>
  
  <p>or</p>
  
  <pre><code>    Uncaught Error: Script error for: jquery
  http://requirejs.org/docs/errors.html#scripterror
  at /node_modules/requirejs/require.js:141
  
      Uncaught Error: Script error for: underscore
  http://requirejs.org/docs/errors.html#scripterror
  at /node_modules/requirejs/require.js:141
  </code></pre>
  
  <hr>
  
  <h1>^tldr: <a href="https://github.com/andrew-luhring/karma-require-whathaveyoudone" rel="noreferrer">check the repo</a></h1>