karma.conf.js 1.1 KB

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