Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ReferenceError: Can't find variable: ApplicationConfiguration

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....

like image 301
Ziva Avatar asked Aug 22 '15 16:08

Ziva


1 Answers

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.

like image 77
Ziva Avatar answered Nov 11 '22 23:11

Ziva