karma.conf.js 966 B

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