karma.conf.js 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. '!./**/*.d.ts',
  13. './Tools/DevLoader/BabylonLoader.js',
  14. './tests/unit/babylon/babylon.example.tests.js',
  15. './tests/unit/babylon/src/Mesh/babylon.positionAndRotation.tests.js',
  16. './tests/unit/babylon/serializers/babylon.glTFSerializer.tests.js',
  17. './tests/unit/babylon/src/babylon.node.tests.js',
  18. './tests/unit/babylon/src/Animations/babylon.animation.tests.js',
  19. './tests/unit/babylon/src/Animations/babylon.animationGroup.tests.js',
  20. './tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.js',
  21. './tests/unit/babylon/src/PostProcess/babylon.postProcess.tests.js',
  22. './tests/unit/babylon/src/Material/babylon.material.tests.js',
  23. './tests/unit/babylon/src/Mesh/babylon.geometry.tests.js',
  24. './tests/unit/babylon/src/Mesh/babylon.mesh.vertexData.tests.js',
  25. './tests/unit/babylon/src/Tools/babylon.promise.tests.js',
  26. './tests/unit/babylon/src/Cameras/babylon.pointerInput.tests.js',
  27. { pattern: 'dist/preview release/**/*.js', watched: false, included: false, served: true },
  28. { pattern: 'assets/**/*', watched: false, included: false, served: true },
  29. //{ pattern: 'tests/**/*', watched: false, included: false, served: true },
  30. { pattern: 'Playground/scenes/**/*', watched: false, included: false, served: true },
  31. { pattern: 'Playground/textures/**/*', watched: false, included: false, served: true },
  32. { pattern: 'Playground/sounds/**/*', watched: false, included: false, served: true },
  33. { pattern: 'Tools/Config/config.json', watched: false, included: false, served: true },
  34. ],
  35. proxies: {
  36. '/': '/base/'
  37. },
  38. port: 3000,
  39. colors: true,
  40. autoWatch: false,
  41. singleRun: false,
  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. reporters: ['progress', 'junit'],
  46. plugins: [
  47. 'karma-mocha',
  48. 'karma-chai',
  49. 'karma-sinon',
  50. 'karma-chrome-launcher',
  51. 'karma-firefox-launcher',
  52. require('../../Tools/Gulp/helpers/gulp-karmaJunitPlugin')
  53. ],
  54. junitReporter: {
  55. outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
  56. outputFile: 'UnitTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
  57. suite: 'Unit Tests', // suite will become the package name attribute in xml testsuite element
  58. useBrowserName: false, // add browser name to report and classes names
  59. nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
  60. classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
  61. properties: {} // key value pair of properties to add to the <properties> section of the report
  62. },
  63. browsers: ['ChromeHeadless']
  64. })
  65. }