karma.conf.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. module.exports = function(config) {
  2. var configuration = {
  3. frameworks: ['jasmine'],
  4. files: [
  5. 'node_modules/angular/angular.js',
  6. 'node_modules/angular-mocks/angular-mocks.js',
  7. 'node_modules/angular-translate/dist/angular-translate.min.js',
  8. 'dist/app.js',
  9. 'tests/filters.js',
  10. 'tests/service/message.js',
  11. 'tests/service/mime.js',
  12. 'tests/service/qrcode.js',
  13. 'tests/service/uri.js',
  14. 'tests/service/webclient.js',
  15. 'tests/helpers.js',
  16. ],
  17. customLaunchers: {
  18. Chromium_ci_gitlab: {
  19. base: 'Chromium',
  20. flags: ['--no-sandbox'],
  21. },
  22. Chrome_ci_circle: {
  23. base: 'Chrome',
  24. flags: ['--no-sandbox'],
  25. },
  26. }
  27. };
  28. if (process.env.GITLAB_CI) {
  29. configuration.browsers = ['Chromium_ci_gitlab', 'Firefox'];
  30. } else if (process.env.CIRCLECI) {
  31. configuration.browsers = ['Chrome_ci_circle', 'Firefox'];
  32. } else {
  33. configuration.browsers = ['Chromium', 'Firefox'];
  34. }
  35. config.set(configuration);
  36. }