karma.conf.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. module.exports = function(config) {
  2. var configuration = {
  3. frameworks: ['jasmine'],
  4. mime: {
  5. 'application/wasm': ['wasm'],
  6. },
  7. files: [
  8. // Angular core
  9. 'node_modules/angular/angular.js',
  10. 'node_modules/angular-aria/angular-aria.min.js',
  11. 'node_modules/angular-animate/angular-animate.min.js',
  12. 'node_modules/angular-sanitize/angular-sanitize.min.js',
  13. 'node_modules/angular-route/angular-route.min.js',
  14. 'node_modules/angular-material/angular-material.min.js',
  15. 'node_modules/angular-translate/dist/angular-translate.min.js',
  16. // Angular mocking
  17. 'node_modules/angular-mocks/angular-mocks.js',
  18. // SaltyRTC
  19. 'node_modules/@saltyrtc/chunked-dc/dist/chunked-dc.es5.js',
  20. // App bundles
  21. 'dist/generated/app_noinit.bundle.js',
  22. 'dist/generated/unittest_karma.bundle.js',
  23. {pattern: 'dist/generated/[0-9].*.bundle.js', included: false, serve: true},
  24. {pattern: 'dist/generated/*.module.wasm', included: false, serve: true, type: 'wasm'},
  25. // Tests
  26. 'tests/init.js',
  27. 'tests/filters.js',
  28. 'tests/service/message.js',
  29. 'tests/service/mime.js',
  30. 'tests/service/qrcode.js',
  31. 'tests/service/uri.js',
  32. 'tests/service/webclient.js',
  33. 'tests/service/string.js',
  34. 'tests/service/browser.js',
  35. 'tests/service/keystore.js',
  36. 'tests/service/log.js',
  37. 'tests/service/notification.js',
  38. 'tests/service/receiver.js',
  39. ],
  40. proxies: {
  41. // Also serve all generated files on the root.
  42. // This is required for the .wasm modules.
  43. '/dist/generated/': '/base/dist/generated/',
  44. },
  45. customLaunchers: {
  46. Chromium_ci_gitlab: {
  47. base: 'Chromium',
  48. flags: ['--no-sandbox'],
  49. },
  50. Chrome_ci_circle: {
  51. base: 'Chrome',
  52. flags: ['--no-sandbox'],
  53. },
  54. }
  55. };
  56. if (process.env.GITLAB_CI) {
  57. configuration.browsers = ['Chromium_ci_gitlab', 'Firefox'];
  58. } else if (process.env.CIRCLECI) {
  59. configuration.browsers = ['Chrome_ci_circle', 'Firefox'];
  60. } else {
  61. configuration.browsers = ['Chromium', 'Firefox'];
  62. }
  63. config.set(configuration);
  64. };