2 var TEST_REGEXP = /(spec|test)\.js$/i;
4 // Get a list of all the test files to include
5 Object.keys(window.__karma__.files).forEach(function(file) {
6 if (TEST_REGEXP.test(file)) {
7 // Normalize paths to RequireJS module names.
8 // If you require sub-dependencies of test files to be loaded as-is (requiring file extension)
9 // then do not normalize the paths
10 var normalizedTestModule = file.replace(/^\/base\/|\.js$/g, '');
11 allTestFiles.push(normalizedTestModule);
16 // Karma serves files under /base, which is the basePath from your config file
19 // dynamically load all test files
22 // we have to kickoff jasmine, as it is asynchronous
23 callback: window.__karma__.start