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.

79 lines
2.0 KiB

  1. // Karma configuration
  2. // Generated on Thu Sep 04 2014 07:41:43 GMT-0400 (EDT)
  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: ['qunit'],
  10. // plugins: ['karma-qunit', 'karma-coverage', 'phantomjs', 'karma-phantomjs-launcher'],
  11. // list of files / patterns to load in the browser
  12. files: [
  13. // 'http://code.jquery.com/jquery.js',
  14. 'node_modules/jquery/dist/jquery.min.js',
  15. 'build/toastr.css',
  16. 'toastr.js',
  17. 'node_modules/qunitjs/qunit/qunit.js',
  18. 'tests/unit/qunit-helper.js',
  19. //'tests/unit/x.js'
  20. 'tests/unit/toastr-tests.js'
  21. ],
  22. // list of files to exclude
  23. exclude: [
  24. ],
  25. // preprocess matching files before serving them to the browser
  26. // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  27. preprocessors: {
  28. 'toastr.js': 'coverage'
  29. },
  30. // test results reporter to use
  31. // possible values: 'dots', 'progress'
  32. // available reporters: https://npmjs.org/browse/keyword/karma-reporter
  33. reporters: ['progress', 'coverage'],
  34. coverageReporter: {
  35. type: 'lcov',
  36. dir: 'tests/coverage'
  37. },
  38. // web server port
  39. port: 9876,
  40. // enable / disable colors in the output (reporters and logs)
  41. colors: true,
  42. // level of logging
  43. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  44. logLevel: config.LOG_INFO,
  45. // enable / disable watching file and executing tests whenever any file changes
  46. autoWatch: false,
  47. // start these browsers
  48. // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  49. browsers: ['PhantomJS'],
  50. // Continuous Integration mode
  51. // if true, Karma captures browsers, runs the tests and exits
  52. singleRun: true
  53. });
  54. };