karma.conf.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // Karma configuration
  2. // Generated on Wed Oct 09 2013 19:20:49 GMT+0800 (中国标准时间)
  3. module.exports = function(config) {
  4. var base_path = '../';
  5. config.set({
  6. // base path, that will be used to resolve files and exclude
  7. basePath: '',
  8. // frameworks to use
  9. frameworks: ['jasmine'],
  10. // list of files / patterns to load in the browser
  11. files: [
  12. // base_path+'dev-lib/kitygraph.all.js',
  13. // base_path+'dev-lib/kity-formula.all.js',
  14. base_path+'dist/kitygraph.all.js',
  15. base_path+'spec/tools/js/UserAction.js',
  16. base_path+'spec/SpecHelper.js'
  17. ,base_path+'spec/core/*.js'
  18. ,base_path+'spec/graphic/*.js'
  19. ],
  20. // list of files to exclude
  21. exclude: [
  22. 'karma.conf.js'
  23. ],
  24. // test results reporter to use
  25. // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
  26. // reporters: ['progress'],
  27. // web server port
  28. port: 9876,
  29. // enable / disable colors in the output (reporters and logs)
  30. colors: true,
  31. // level of logging
  32. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  33. logLevel: config.LOG_INFO,
  34. // enable / disable watching file and executing tests whenever any file changes
  35. autoWatch: true,
  36. // Start these browsers, currently available:
  37. // - Chrome
  38. // - ChromeCanary
  39. // - Firefox
  40. // - Opera
  41. // - Safari (only Mac)
  42. // - PhantomJS
  43. // - IE (only Windows)
  44. browsers: ['Firefox','Chrome'],//,'Chrome'
  45. // If browser does not capture in given timeout [ms], kill it
  46. captureTimeout: 60000,
  47. // Continuous Integration mode
  48. // if true, it capture browsers, run tests and exit
  49. singleRun: true,
  50. //coverage
  51. reporters: ['progress', 'coverage','junit'],
  52. preprocessors: {
  53. '../dist/kitygraph.all.js': ['coverage']
  54. }
  55. ,
  56. coverageReporter: {
  57. type: 'text',
  58. dir: './coverage/json_files/'
  59. }
  60. // ,
  61. // junitReporter: {
  62. // outputFile: 'test-results.xml'
  63. // }
  64. });
  65. };