karma.conf.js 1.0 KB

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