karma.conf.js 749 B

12345678910111213141516171819202122232425262728293031323334
  1. module.exports = function(config) {
  2. config.set({
  3. frameworks: [ 'mocha' ]
  4. , files: [
  5. 'chai.js'
  6. , 'test/bootstrap/index.js'
  7. , 'test/*.js'
  8. ]
  9. , reporters: [ 'progress' ]
  10. , colors: true
  11. , logLevel: config.LOG_INFO
  12. , autoWatch: false
  13. , browsers: [ 'HeadlessChrome' ]
  14. , customLaunchers: {
  15. HeadlessChrome: {
  16. base: 'ChromeHeadless'
  17. , flags: [ '--no-sandbox',]
  18. , }
  19. , }
  20. , browserDisconnectTimeout: 10000
  21. , browserDisconnectTolerance: 2
  22. , browserNoActivityTimeout: 20000
  23. , singleRun: true
  24. });
  25. switch (process.env.CHAI_TEST_ENV) {
  26. case 'sauce':
  27. require('./karma.sauce')(config);
  28. break;
  29. default:
  30. // ...
  31. break;
  32. };
  33. };