requirejs.config.js 518 B

123456789101112131415161718192021
  1. var tests = [];
  2. for (var file in window.__karma__.files) {
  3. if (/Test\.js$/.test(file)) {
  4. tests.push(file);
  5. }
  6. }
  7. // This module is typically built in PHP. We can't do that with the test runner.
  8. define('elgg', function() { return elgg; });
  9. requirejs.config({
  10. // Karma serves files from '/base'
  11. baseUrl: '/base/views/default/js/',
  12. // ask Require.js to load these files (all our tests)
  13. deps: tests,
  14. // start test run, once Require.js is done
  15. callback: window.__karma__.start
  16. });