karma.conf.ci.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. frameworks: ['jasmine'],
  70. files: [
  71. 'stackframe.js',
  72. 'spec/*-spec.js'
  73. ],
  74. exclude: [],
  75. port: 9876,
  76. colors: false,
  77. logLevel: config.LOG_INFO,
  78. autoWatch: false,
  79. browserDisconnectTimeout: 10000,
  80. browserDisconnectTolerance: 1,
  81. browserNoActivityTimeout: 240000,
  82. captureTimeout: 240000,
  83. sauceLabs: {
  84. testName: 'stackframe unit tests',
  85. recordScreenshots: false,
  86. connectOptions: {
  87. port: 5757,
  88. logfile: 'sauce_connect.log'
  89. }
  90. },
  91. customLaunchers: customLaunchers,
  92. browsers: Object.keys(customLaunchers),
  93. reporters: ['dots', 'saucelabs', 'coverage', 'coveralls'],
  94. preprocessors: {
  95. 'stackframe.js': 'coverage'
  96. },
  97. coverageReporter: {
  98. type: 'lcov',
  99. dir: 'coverage'
  100. },
  101. singleRun: true
  102. });
  103. };