test-main.coffee 472 B

123456789101112131415
  1. # Set up requirejs to load the tests
  2. # Uses heuristic that test filenames end with Tests.js (existing frontend code)
  3. # or _tests.js (newer frontend code)
  4. tests = []
  5. for file of window.__karma__.files
  6. if window.__karma__.files.hasOwnProperty(file)
  7. if /test\/unit_frontend\/js.+(_t|T)ests\.js$/.test(file)
  8. tests.push(file)
  9. requirejs.config
  10. baseUrl: '/base/public/js'
  11. paths:
  12. "moment": "libs/moment-2.9.0"
  13. deps: tests
  14. callback: window.__karma__.start