karma.conf.js 3.1 KB

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