karma.conf.js 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. '!./**/*.d.ts',
  14. './dist/preview release/earcut.min.js',
  15. './Tools/DevLoader/BabylonLoader.js',
  16. './tests/validation/index.css',
  17. './tests/validation/integration.js',
  18. './favicon.ico',
  19. { pattern: 'dist/preview release/**/*.js', watched: false, included: false, served: true },
  20. { pattern: 'dist/preview release/**/*.wasm', watched: false, included: false, served: true },
  21. { pattern: 'assets/**/*', watched: false, included: false, served: true },
  22. { pattern: 'tests/**/*', watched: false, included: false, served: true },
  23. { pattern: 'Playground/scenes/**/*', watched: false, included: false, served: true },
  24. { pattern: 'Playground/textures/**/*', watched: false, included: false, served: true },
  25. { pattern: 'Playground/sounds/**/*', watched: false, included: false, served: true },
  26. { pattern: 'Tools/Config/config.json', watched: false, included: false, served: true },
  27. ],
  28. proxies: {
  29. '/': '/base/'
  30. },
  31. port: 3000,
  32. colors: true,
  33. autoWatch: false,
  34. singleRun: false,
  35. // level of logging
  36. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  37. logLevel: config.LOG_INFO,
  38. reporters: ['progress', 'junit'],
  39. plugins: [
  40. 'karma-mocha',
  41. 'karma-chai',
  42. 'karma-sinon',
  43. 'karma-chrome-launcher',
  44. 'karma-firefox-launcher',
  45. require('../../Tools/Gulp/helpers/gulp-karmaJunitPlugin')
  46. ],
  47. junitReporter: {
  48. outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
  49. outputFile: 'ValidationTests2.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
  50. suite: 'Validation Tests WebGL2', // suite will become the package name attribute in xml testsuite element
  51. useBrowserName: false, // add browser name to report and classes names
  52. nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
  53. classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
  54. properties: {} // key value pair of properties to add to the <properties> section of the report
  55. },
  56. browsers: ['Chrome']
  57. });
  58. };