Draft test shell with karma and jasmine - adding missing files

This commit is contained in:
knsv
2014-11-04 07:50:58 +01:00
parent 2a92168a0d
commit f35e43c512
4 changed files with 136 additions and 0 deletions

24
test/test-main.js Normal file
View File

@@ -0,0 +1,24 @@
/**
* Created by knut on 14-11-03.
*/
var tests = [];
for (var file in window.__karma__.files) {
if (window.__karma__.files.hasOwnProperty(file)) {
if (/spec\.js$/.test(file)) {
var file2 = file.substr(10,file.length-13);
console.log(file2);
tests.push(file2);
}
}
}
require.config({
// Karma serves files from '/base'
baseUrl: '/base/src',
// ask Require.js to load these files (all our tests)
deps: tests,
// start test run, once Require.js is done
callback: window.__karma__.start
});