test-main.js 653 B

12345678910111213141516171819202122232425
  1. /* eslint-disable
  2. no-undef,
  3. */
  4. // TODO: This file was created by bulk-decaffeinate.
  5. // Fix any style issues and re-enable lint.
  6. // Set up requirejs to load the tests
  7. // Uses heuristic that test filenames end with Tests.js (existing frontend code)
  8. // or _tests.js (newer frontend code)
  9. const tests = []
  10. for (let file in window.__karma__.files) {
  11. if (window.__karma__.files.hasOwnProperty(file)) {
  12. if (/test\/unit_frontend\/js.+(_t|T)ests\.js$/.test(file)) {
  13. tests.push(file)
  14. }
  15. }
  16. }
  17. requirejs.config({
  18. baseUrl: '/base/public/js',
  19. paths: {
  20. moment: 'libs/moment-2.9.0'
  21. },
  22. deps: tests,
  23. callback: window.__karma__.start
  24. })