karma.conf.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* eslint-env node,jasmine */
  2. module.exports = function(config) {
  3. config.set({
  4. // base path that will be used to resolve all patterns (eg. files, exclude)
  5. basePath: "",
  6. // frameworks to use
  7. // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  8. frameworks: ["jasmine"],
  9. // list of files / patterns to load in the browser
  10. files: [
  11. "node_modules/angular/angular.min.js",
  12. "node_modules/angular-animate/angular-animate.min.js",
  13. "node_modules/angular-aria/angular-aria.min.js",
  14. "node_modules/angular-sanitize/angular-sanitize.min.js",
  15. "node_modules/angular-material/angular-material.min.js",
  16. "dist/angular-material-calendar.js",
  17. "node_modules/angular-mocks/angular-mocks.js",
  18. "test/unit/**/*.spec.js"
  19. ],
  20. // list of files to exclude
  21. exclude: [
  22. ],
  23. // preprocess matching files before serving them to the browser
  24. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  25. preprocessors: {
  26. "dis/**/*.js": ["coverage"]
  27. },
  28. coverageReporter: {
  29. type: "lcov",
  30. dir: "coverage/"
  31. },
  32. // test results reporter to use
  33. // possible values: "dots", "progress"
  34. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  35. reporters: ["dots", "coverage", "coveralls"],
  36. // web server port
  37. port: 9876,
  38. // enable / disable colors in the output (reporters and logs)
  39. colors: true,
  40. // level of logging
  41. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  42. logLevel: config.LOG_WARN,
  43. // enable / disable watching file and executing tests whenever any file changes
  44. autoWatch: true,
  45. // start these browsers
  46. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  47. browsers: ["Chrome"],
  48. // Continuous Integration mode
  49. // if true, Karma captures browsers, runs the tests and exits
  50. singleRun: false
  51. });
  52. };