2
0
Fork 0
es5-ff-spa-loader/test/spec-runner.js

28 lines
648 B
JavaScript
Raw Normal View History

2016-04-22 08:34:11 +00:00
var testModules = [];
var TEST_REGEXP = /^\/base\/test\/spec\/\S*.js$/i;
var pathToModule = function(path) {
2016-04-23 01:58:27 +00:00
'use strict';
2016-04-22 08:34:11 +00:00
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
};
testModules.push('es5-ff-spa-loader');
Object.keys(window.__karma__.files).forEach(function(file) {
2016-04-23 01:58:27 +00:00
'use strict';
2016-04-22 08:34:11 +00:00
//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
});