Created
December 2, 2013 18:54
-
-
Save karlwestin/7754871 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tests = []; | |
for (var file in window.__karma__.files) { | |
if (window.__karma__.files.hasOwnProperty(file)) { | |
if (/\/base\/spec\/js\/v2\/.*\.js$/.test(file)) { | |
tests.push(file); | |
} | |
} | |
} | |
console.log("Running tests for"); | |
console.log(tests); | |
requirejs.config({ | |
// Karma serves files from '/base' | |
baseUrl: '/base/js', | |
shim: { | |
"lib/jquery" : { | |
"exports" : "jquery" | |
} | |
}, | |
deps : ["lib/jquery"], | |
paths: { | |
"lib/jquery": "lib/jquery", | |
"jquery": "lib/jquery" | |
}, | |
callback: function() { | |
require(tests, function(resolvedTests) { | |
$.when.apply($, arguments).done(function() { | |
window.__karma__.start(); | |
}); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment