karma.conf.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. module.exports = function(config) {
  2. var detectBrowsers = {
  3. enabled: false,
  4. usePhantomJS: false
  5. };
  6. // On Travis CI, we can only run in Firefox and Chrome; so, enforce that.
  7. if (process.env.TRAVIS) {
  8. config.browsers = ['Firefox', 'travisChrome'];
  9. }
  10. // If no browsers are specified, we enable `karma-detect-browsers`
  11. // this will detect all browsers that are available for testing
  12. if (!config.browsers.length) {
  13. detectBrowsers.enabled = true;
  14. }
  15. config.set({
  16. basePath: '..',
  17. frameworks: ['qunit', 'detectBrowsers'],
  18. files: [
  19. 'node_modules/video.js/dist/video-js.css',
  20. 'node_modules/es5-shim/es5-shim.js',
  21. 'node_modules/sinon/pkg/sinon.js',
  22. 'node_modules/video.js/dist/video.js',
  23. 'test/dist/bundle.js'
  24. ],
  25. customLaunchers: {
  26. travisChrome: {
  27. base: 'Chrome',
  28. flags: ['--no-sandbox']
  29. }
  30. },
  31. detectBrowsers: detectBrowsers,
  32. reporters: ['dots'],
  33. port: 9876,
  34. colors: true,
  35. autoWatch: false,
  36. singleRun: true,
  37. concurrency: Infinity
  38. });
  39. };