karma.conf.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. module.exports = function (config) {
  2. 'use strict';
  3. config.set({
  4. basePath: '../../',
  5. captureTimeout: 3e5,
  6. browserNoActivityTimeout: 3e5,
  7. browserDisconnectTimeout: 3e5,
  8. browserDisconnectTolerance: 3,
  9. concurrency: 1,
  10. urlRoot: '/karma/',
  11. frameworks: ['mocha', 'chai', 'sinon'],
  12. files: [
  13. './tests/validation/index.css',
  14. './tests/validation/integration.js',
  15. './tests/build/test.js',
  16. './tests/validation/validation.js',
  17. { pattern: './tests/**/*', watched: false, included: false, served: true },
  18. { pattern: './dist/assets/**/*', watched: false, included: false, served: true },
  19. ],
  20. proxies: {
  21. '/tests/': '/base/tests/',
  22. '/dist/assets/': '/base/dist/assets/'
  23. },
  24. port: 3000,
  25. colors: true,
  26. autoWatch: false,
  27. singleRun: false,
  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: 'ViewerValidationTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
  35. suite: 'Viewer Validation 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: ['Chrome']
  42. });
  43. };