karma.conf.js 999 B

123456789101112131415161718192021222324252627282930313233343536
  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. 'dist/app.js',
  8. 'tests/filters.js',
  9. 'tests/qrcode.js',
  10. 'tests/service/message.js',
  11. 'tests/helpers.js',
  12. ],
  13. customLaunchers: {
  14. Chromium_ci_gitlab: {
  15. base: 'Chromium',
  16. flags: ['--no-sandbox'],
  17. },
  18. Chrome_ci_circle: {
  19. base: 'Chrome',
  20. flags: ['--no-sandbox'],
  21. },
  22. }
  23. };
  24. if (process.env.GITLAB_CI) {
  25. configuration.browsers = ['Chromium_ci_gitlab', 'Firefox'];
  26. } else if (process.env.CIRCLECI) {
  27. configuration.browsers = ['Chrome_ci_circle', 'Firefox'];
  28. } else {
  29. configuration.browsers = ['Chromium', 'Firefox'];
  30. }
  31. config.set(configuration);
  32. }