title: Why won't my Unit Tests run?
body: <p>My <code>karma.conf.coffee</code> is:</p>
  
  <pre><code>module.exports = (config) -&gt;
    config.set
      basePath: '../../'
  
      preprocessors:
        '**/*.coffee': ['coffee']
  
      files: [
        'dist/assets/vendor.js'
        'public/bower_components/angular-mocks/angular-mocks.js'
        'dist/assets/app.js'
        'test/public/**/*.coffee'
      ]
  
      singleRun: true
  
      frameworks: ['mocha']
  
      browsers: ['PhantomJS']
  
      reporters: ['story']
  
      logLevel: config.LOG_INFO
  
      coffeePreprocessor:
        options:
          bare: true
          sourceMap: false
        transformPath: (path) -&gt;
          path.replace(/\.coffee$/, '.js')
  </code></pre>
  
  <p><code>vendor.js</code> is a concatenated js of <code>angular.js</code>, <code>angular-route.js</code> and <code>angular-strap.js</code>. <code>app.js</code> is all of my angular code concatenated.</p>
  
  <p>I have a test: <code>test/public/controllers/login.spec.coffee</code> that looks like:</p>
  
  <pre><code>(-&gt;
    describe 'Login Controller', -&gt;
      beforeEach module 'myApp
  
      it 'should initialize the controller', -&gt;
        # createController()
  
        # $scope.init()
  )()
  </code></pre>
  
  <p>When I run the test, I get:</p>
  
  <pre><code>PhantomJS 1.9.7 (Mac OS X) - Login Controller:
  PhantomJS 1.9.7 (Mac OS X)  "before each" hook: [object Object] FAILED
  PhantomJS 1.9.7 (Mac OS X): Executed 1 of 1 (1 FAILED) ERROR (0.005 secs / 0 secs)
  PhantomJS 1.9.7 (Mac OS X)
  PhantomJS 1.9.7 (Mac OS X) Login Controller "before each" hook: [object Object] FAILED
      TypeError: 'undefined' is not an object (evaluating 'fn.call')
  </code></pre>
  
  <p>What am I doing wrong?</p>