28 lines
648 B
JavaScript
28 lines
648 B
JavaScript
var testModules = [];
|
|
var TEST_REGEXP = /^\/base\/test\/spec\/\S*.js$/i;
|
|
|
|
var pathToModule = function(path) {
|
|
'use strict';
|
|
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
|
|
};
|
|
|
|
testModules.push('es5-ff-spa-loader');
|
|
|
|
Object.keys(window.__karma__.files).forEach(function(file) {
|
|
'use strict';
|
|
//console.log('file: '+file);
|
|
if (TEST_REGEXP.test(file)) {
|
|
var fileNew = pathToModule(file);
|
|
testModules.push(fileNew);
|
|
//console.log('file: '+file+' fileNew: '+fileNew);
|
|
}
|
|
});
|
|
|
|
require.config({
|
|
baseUrl : '/base/',
|
|
enforceDefine : true,
|
|
xhtml : false,
|
|
waitSeconds : 30,
|
|
deps : testModules,
|
|
callback : window.__karma__.start
|
|
}); |