I. Different RequireJS BaseURL
problem: Requirejs baseUrl for test-environment and your application is different. It cause several dependecies problem
baseUrl: './app/js', // folder app/js
// Karma serves files under /base, which is the basePath from your config file
baseUrl: '/base/app/', //folder app
solution: always make both
II. chai and requirejs problem
problem: Uncaught TypeError: Cannot read property 'should' of undefined
solution: put requirejs before chai in karma framework list( ref: https://github.com/xdissent/karma-chai/issues/5)
III. No timeStamp for file
problem: ERROR: 'There is no timestamp for /base/app/templates/setting.js!'
solution: try to check your files list in karma.conf.js. It is because the file is not included
last but not least, here is my configuration for
Hope it helps you!