karma.conf.js 927 B

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