title: Karma fails when using PhantomJS but not Chrome
body: <p>I have a series of tests that are pass when I use the Karma Chrome Launcher but fail when I use the Karma PhantomJS launcher.</p>
  
  <p>Here is my what's inside my karma.config.js file
  ```
      frameworks: ['browserify','mocha','chai', 'sinon'],</p>
  
  <pre><code>files: require('./include.conf.js').concat([
    'test/helper/*.js',
    'test/example/*.spec.js',
    'test/unit/*.spec.js',
    'test/integration/*.spec.js'
  ]),
  
  
  // list of files to exclude
  exclude: [
    'gulpfile.js',
    'index.js',
    'karma.conf.js'
  ],
  
  browserify: {
      debug: true,
      transform: ['reactify'],
      bundleDelay: 1000
  },
  
  preprocessors: {
      'test/helper/*.js': ['browserify'],
      'test/example/*.spec.js': ['browserify'],
      'test/unit/*.spec.js': ['browserify'],
      'test/integration/*.spec.js': ['browserify'],
      'dev/js/**/*.js': ['browserify']
  },
  
  // web server port
  port: 9876,
  
  autoWatch: true,
  
  browsers: ['PhantomJS'],
  
  // Continuous Integration mode
  // if true, Karma captures browsers, runs the tests and exits
  singleRun: true,
  
  plugins: [
      'karma-coverage',
      'karma-mocha',
      'karma-browserify',
      'karma-chai',
      'karma-sinon',
      'karma-phantomjs-launcher'
  ]```
  </code></pre>
  
  <p>All of the files are being preprocessed and running properly with the Karma Chrome Launcher, but when I try to run them with PhantomJS, I get a bunch of errors like this :</p>
  
  <p>PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
    ReferenceError: Can't find variable: require
    at /Users/edwinlin/Documents/repos/Picarus/dev/js/utils/database-utils.js:1</p>
  
  <p>Thanks for anyone's help!</p>