2
0
Fork 0
es5-ff-spa-loader/test/spec-runner.js
2016-04-22 10:34:11 +02:00

26 lines
618 B
JavaScript

var testModules = [];
var TEST_REGEXP = /^\/base\/test\/spec\/\S*.js$/i;
var pathToModule = function(path) {
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
};
testModules.push('es5-ff-spa-loader');
Object.keys(window.__karma__.files).forEach(function(file) {
//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
});