I am trying to configure my karma jasmine unit testing with requirejs. But each time i run it, i am getting the below error:
Chrome 34.0.1847 (Mac OS X 10.9.
Since you're loading the specific .js files you need in your test-main.js with the paths: { }
parameter, you don't have to explicitly list them in karma.config.js. Instead, you can just use your line { pattern: 'app/**/*.js', included: false }
. All the lines before that are redundant. Just make sure you have the included: false
modifier, otherwise Karma will load them in-line, and you'll get the Uncaught Error: Mismatched anonymous define()
problem