With karma 0.10 I've done the following:
created an
helper.js
file which has been added to the JS list in the karma configurationmodule.exports = function(config) { config.set({ ... files: [ // Helping Libraries 'vendor/jquery.js', 'helpers/helper.js', ... ], ...
the content of the helper is:
window.__karma__.loaded = function() {}; $(function () { // do my stuff in here // at the end of my stuff start karma: window.__karma__.start(); });