You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
4.0 KiB

  1. // Karma example configuration file
  2. // NOTE: To configure Karma tests, do the following:
  3. // 1. Copy this file and rename the copy with a .conf.js extension, for example: karma.conf.js
  4. // 2. Configure the properties below in your conf.js copy
  5. // 3. Run your tests
  6. module.exports = function(config) {
  7. config.set({
  8. // base path, that will be used to resolve files and exclude
  9. basePath: '',
  10. frameworks: ['qunit'],
  11. // Set autoWatch to true if you plan to run `grunt karma` continuously, to automatically test changes as you make them.
  12. autoWatch: false,
  13. // Setting singleRun to true here will start up your specified browsers, run tests, and then shut down the browsers. Helpful to have in a CI environment, where you don't want to leave browsers running continuously.
  14. singleRun: true,
  15. // Start these browsers, currently available:
  16. // - Chrome
  17. // - ChromeCanary
  18. // - Firefox
  19. // - Opera
  20. // - Safari (only Mac)
  21. // - PhantomJS
  22. // - IE (only Windows)
  23. // Example usage:
  24. browsers: ['chrome_test'],
  25. //'firefox_test',
  26. //'safari_test',
  27. //'ipad_test',
  28. //'android_test'
  29. // List of files / patterns to load in the browser
  30. // Add any new src files to this list.
  31. // If you add new unit tests, they will be picked up automatically by Karma,
  32. // unless you've added them to a nested directory, in which case you should
  33. // add their paths to this list.
  34. files: [
  35. '../node_modules/video.js/dist/video-js/video.js',
  36. '../node_modules/videojs-contrib-media-sources/videojs-media-sources.js',
  37. '../test/karma-qunit-shim.js',
  38. "../src/videojs-hls.js",
  39. "../src/flv-tag.js",
  40. "../src/exp-golomb.js",
  41. "../src/h264-stream.js",
  42. "../src/aac-stream.js",
  43. "../src/segment-parser.js",
  44. "../src/stream.js",
  45. "../src/m3u8/m3u8-parser.js",
  46. "../tmp/manifests.js",
  47. "../tmp/expected.js",
  48. "tsSegment-bc.js",
  49. "../src/bin-utils.js",
  50. "../src/async-queue.js",
  51. '../test/*.js'
  52. ],
  53. plugins: [
  54. 'karma-qunit',
  55. 'karma-chrome-launcher',
  56. 'karma-firefox-launcher',
  57. 'karma-ie-launcher',
  58. 'karma-opera-launcher',
  59. 'karma-phantomjs-launcher',
  60. 'karma-safari-launcher',
  61. 'karma-sauce-launcher'
  62. ],
  63. // list of files to exclude
  64. exclude: [
  65. ],
  66. // test results reporter to use
  67. // possible values: 'dots', 'progress', 'junit'
  68. reporters: ['progress'],
  69. // web server port
  70. port: 9876,
  71. // cli runner port
  72. runnerPort: 9100,
  73. // enable / disable colors in the output (reporters and logs)
  74. colors: true,
  75. // level of logging
  76. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  77. //logLevel: config.LOG_INFO,
  78. // If browser does not capture in given timeout [ms], kill it
  79. captureTimeout: 60000,
  80. // global config for SauceLabs
  81. sauceLabs: {
  82. startConnect: true,
  83. tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
  84. build: process.env.TRAVIS_BUILD_NUMBER,
  85. testName: process.env.TRAVIS_BUILD_NUMBER + process.env.TRAVIS_BRANCH,
  86. recordScreenshots: false
  87. },
  88. //define SL browsers
  89. customLaunchers: {
  90. chrome_test: {
  91. singleRun: true,
  92. base: 'SauceLabs',
  93. browserName: 'chrome',
  94. platform: 'Windows XP'
  95. },
  96. firefox_test: {
  97. singleRun: true,
  98. base: 'SauceLabs',
  99. browserName: 'firefox',
  100. platform: 'Windows 8'
  101. },
  102. safari_test: {
  103. singleRun: true,
  104. base: 'SauceLabs',
  105. browserName: 'safari',
  106. platform: 'OS X 10.8'
  107. },
  108. ipad_test: {
  109. singleRun: true,
  110. base: 'SauceLabs',
  111. browserName: 'ipad',
  112. platform:'OS X 10.8'
  113. },
  114. android_test: {
  115. singleRun: true,
  116. base: 'SauceLabs',
  117. browserName: 'android',
  118. platform:'Linux'
  119. }
  120. }
  121. });
  122. };