ReferenceError: Can't find variable: ApplicationConfiguration

Ziva picture Ziva · Aug 22, 2015 · Viewed 7.6k times · Source

I am getting ReferenceError: Can't find variable: ApplicationConfiguration at application.js on running 'npm test' or 'karma start' in CLI. My karma.config.js for reference is :

module.exports = function(config) {

  config.set({

    frameworks: ['jasmine'],

    files: [
      'public/lib/angular/angular.js',
      'public/lib/angular-*/angular-*.js',
      'public/lib/angular-mocks/angular-mocks.js',
      'public/lib/jquery/dist/jquery.js',
      'public/lib/angular-ui-router/release/angular-ui-router.js',
      'public/lib/angular-resource/angular-resource.js',
      'public/**/*.js',
      'public/modules/core/tests/unit/*.js'
    ],

    exclude: [
    ],

    preprocessors: {
    },

    reporters: ['progress'],

    port: 9876,

    colors: true,

    logLevel: config.LOG_INFO,

    autoWatch: true,

    browsers: ['PhantomJS'],

    singleRun: false
  })
}

Please help me....

Answer

Ziva picture Ziva · Sep 5, 2015

My issue solved. Had to give proper sequence of files in karma.conf.js instead of putting public/**/*.js as a whole Proper sequence of files to be added in karma.config.js when ur project is built meanjs yo :

. jquery,angular,angular-mocks,router,config.js,application.js,client.module.js,co‌​ntoller.js,test.js should be the proper sequence.