karma.conf.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. module.exports = function (config) {
  2. config.set({
  3. basePath: '../',
  4. captureTimeout: 3e5,
  5. browserNoActivityTimeout: 3e5,
  6. browserDisconnectTimeout: 3e5,
  7. browserDisconnectTolerance: 3,
  8. concurrency: 1,
  9. urlRoot: '/karma/',
  10. frameworks: ['mocha', 'chai', 'sinon'],
  11. files: [
  12. './tests/build/*.js',
  13. { pattern: './tests/**/*', watched: false, included: false, served: true },
  14. ],
  15. proxies: {
  16. '/tests/': '/base/tests/'
  17. },
  18. client: {
  19. mocha: {
  20. timeout: 10000
  21. }
  22. },
  23. port: 3000,
  24. colors: true,
  25. autoWatch: false,
  26. singleRun: true,
  27. browserNoActivityTimeout: 20000,
  28. // level of logging
  29. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  30. logLevel: config.LOG_INFO,
  31. reporters: ['progress', 'junit'],
  32. junitReporter: {
  33. outputDir: '../.temp/testResults', // results will be saved as $outputDir/$browserName.xml
  34. outputFile: 'ViewerUnitTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
  35. suite: 'Viewer Unit Tests', // suite will become the package name attribute in xml testsuite element
  36. useBrowserName: false, // add browser name to report and classes names
  37. nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
  38. classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
  39. properties: {} // key value pair of properties to add to the <properties> section of the report
  40. },
  41. browsers: ['ChromeHeadless']
  42. })
  43. }