karma.conf.js 3.0 KB

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