karma.conf.ci.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. module.exports = function(config) {
  2. if (!process.env.SAUCE_USERNAME || !process.env.SAUCE_ACCESS_KEY) {
  3. console.error('Make sure the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are set.');
  4. process.exit(1);
  5. }
  6. // Check out https://saucelabs.com/platforms for all browser/platform combos
  7. var customLaunchers = {
  8. slChrome: {
  9. base: 'SauceLabs',
  10. browserName: 'chrome',
  11. version: 'latest'
  12. },
  13. slChromeBeta: {
  14. base: 'SauceLabs',
  15. browserName: 'chrome',
  16. version: 'beta'
  17. },
  18. slFirefox: {
  19. base: 'SauceLabs',
  20. browserName: 'firefox',
  21. version: 'latest'
  22. },
  23. slFirefoxBeta: {
  24. base: 'SauceLabs',
  25. browserName: 'firefox',
  26. version: 'beta'
  27. },
  28. slSafari: {
  29. base: 'SauceLabs',
  30. browserName: 'safari',
  31. platform: 'OS X 10.14',
  32. version: 'latest'
  33. },
  34. slEdge: {
  35. base: 'SauceLabs',
  36. browserName: 'microsoftedge',
  37. platform: 'Windows 10',
  38. version: 'latest'
  39. },
  40. slIE11: {
  41. base: 'SauceLabs',
  42. browserName: 'internet explorer',
  43. platform: 'Windows 8.1',
  44. version: '11'
  45. },
  46. slIE10: {
  47. base: 'SauceLabs',
  48. browserName: 'internet explorer',
  49. platform: 'Windows 7',
  50. version: '10'
  51. },
  52. slIE9: {
  53. base: 'SauceLabs',
  54. browserName: 'internet explorer',
  55. platform: 'Windows 7',
  56. version: '10',
  57. 'x-ua-compatible': 'IE=EmulateIE9'
  58. },
  59. slIE8: {
  60. base: 'SauceLabs',
  61. browserName: 'internet explorer',
  62. platform: 'Windows 7',
  63. version: '10',
  64. 'x-ua-compatible': 'IE=EmulateIE8'
  65. }
  66. };
  67. config.set({
  68. basePath: '',
  69. concurrency: 3,
  70. frameworks: ['jasmine'],
  71. files: [
  72. 'stackframe.js',
  73. 'spec/*-spec.js'
  74. ],
  75. exclude: [],
  76. port: 9876,
  77. colors: false,
  78. logLevel: config.LOG_INFO,
  79. autoWatch: false,
  80. browserDisconnectTimeout: 10000,
  81. browserDisconnectTolerance: 1,
  82. browserNoActivityTimeout: 240000,
  83. captureTimeout: 240000,
  84. sauceLabs: {
  85. testName: 'stackframe unit tests',
  86. commandTimeout: 600,
  87. idleTimeout: 600,
  88. recordScreenshots: false,
  89. recordVideo: false,
  90. retryLimit: 3
  91. },
  92. customLaunchers: customLaunchers,
  93. browsers: Object.keys(customLaunchers),
  94. reporters: ['dots', 'saucelabs', 'coverage', 'coveralls'],
  95. preprocessors: {
  96. 'stackframe.js': 'coverage'
  97. },
  98. coverageReporter: {
  99. type: 'lcov',
  100. dir: 'coverage'
  101. },
  102. singleRun: true
  103. });
  104. };