karma.conf.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. "use strict";
  2. // Karma configuration
  3. module.exports = function(config) {
  4. config.set({
  5. // base path that will be used to resolve all patterns (eg. files, exclude)
  6. basePath: "",
  7. // frameworks to use
  8. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  9. frameworks: ["jasmine"],
  10. // list of files / patterns to load in the browser
  11. files: [
  12. "node_modules/jquery/dist/jquery.min.js",
  13. { pattern: "node_modules/jquery/dist/jquery.min.map", watched: false, included: false, served: true },
  14. "node_modules/lodash/lodash.min.js",
  15. "build/element-resize-detector.js",
  16. "js/*_test.js",
  17. "test/*_test.js"
  18. ],
  19. // list of files to exclude
  20. exclude: [
  21. ],
  22. // preprocess matching files before serving them to the browser
  23. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  24. preprocessors: {
  25. },
  26. // test results reporter to use
  27. // possible values: 'dots', 'progress'
  28. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  29. reporters: ["progress"],
  30. // web server port
  31. port: 9876,
  32. // enable / disable colors in the output (reporters and logs)
  33. colors: true,
  34. // level of logging
  35. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  36. logLevel: config.LOG_INFO,
  37. // enable / disable watching file and executing tests whenever any file changes
  38. autoWatch: false,
  39. // start these browsers
  40. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  41. browsers: [
  42. // "Chrome"
  43. //, "IE8 - Win7", "IE10 - Win7", "IE11 - Win8.1"
  44. ],
  45. // Continuous Integration mode
  46. // if true, Karma captures browsers, runs the tests and exits
  47. singleRun: false
  48. });
  49. };