Tone.js/test/karmaTest.js

35 lines
769 B
JavaScript
Raw Normal View History

2016-03-04 21:25:44 +00:00
var tests = [];
for (var file in window.__karma__.files) {
2017-12-30 05:30:52 +00:00
if (window.__karma__.files.hasOwnProperty(file)) {
if (file.indexOf("/base/test/") === 0 && file.indexOf("js") !== -1 &&
file.indexOf("karmaTest.js") === -1 && file.indexOf("helper") === -1 &&
file.indexOf("deps") === -1) {
tests.push(file);
}
}
2016-03-04 21:25:44 +00:00
}
2017-12-30 05:30:52 +00:00
tests.push("deps/babel-polyfill");
2016-03-04 21:25:44 +00:00
requirejs.config({
2017-12-30 05:30:52 +00:00
// Karma serves files from '/base'
baseUrl : "/base/test",
2016-03-04 21:25:44 +00:00
2017-12-30 05:30:52 +00:00
paths : {
"Tone" : "../Tone",
"Test" : "./helper/Test",
"Examples" : "../examples/scripts/ExampleList"
},
shim : {
"Examples" : {
exports : "ExampleList"
}
},
2016-03-04 21:25:44 +00:00
2017-12-30 05:30:52 +00:00
// ask Require.js to load these files (all our tests)
deps : tests,
2016-03-04 21:25:44 +00:00
2017-12-30 05:30:52 +00:00
// start test run, once Require.js is done
callback : window.__karma__.start
});