karma.conf.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Karma configuration
  2. // Generated on Mon Oct 19 2015 01:12:15 GMT+0200 (CEST)
  3. var isTravis = process.env.TRAVIS || false;
  4. var browsers = isTravis ? ['Chrome_travis_ci'] : ['Chrome'];
  5. var singleRun = isTravis;
  6. module.exports = function(config) {
  7. config.set({
  8. basePath: '',
  9. browsers: browsers,
  10. frameworks: ['jasmine-jquery', 'jasmine'],
  11. files: [
  12. 'node_modules/babel-polyfill/dist/polyfill.js',
  13. 'test/index.js',
  14. {
  15. pattern: 'test/fixtures/**/*.html',
  16. watched: true,
  17. included: false,
  18. served: true
  19. }
  20. ],
  21. preprocessors: {
  22. 'test/index.js': ['webpack']
  23. },
  24. webpack: {
  25. devtool: 'inline-source-map',
  26. module: {
  27. loaders: [{
  28. test: /\.js?$/,
  29. exclude: [/bower_components/, /node_modules/],
  30. loader: 'babel'
  31. }, {
  32. test: /\.scss$/,
  33. loader: "css-loader?sourceMap!sass-loader"
  34. }]
  35. }
  36. },
  37. plugins: [
  38. 'karma-chrome-launcher',
  39. 'karma-jasmine-jquery',
  40. 'karma-jasmine',
  41. 'karma-webpack'
  42. ],
  43. reporters: ['dots'],
  44. customLaunchers: {
  45. Chrome_travis_ci: {
  46. base: 'Chrome',
  47. flags: ['--no-sandbox']
  48. }
  49. },
  50. port: 9876,
  51. singleRun: singleRun,
  52. colors: true,
  53. logLevel: config.LOG_WARN
  54. })
  55. }