2
0

karma-precompute.conf.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Copyright 2018 Scytl Secure Electronic Voting SA
  3. *
  4. * All rights reserved
  5. *
  6. * See our extended copyright notice in *file 'Copyright.txt' which is part of this source code package
  7. */
  8. const paths = require('./paths.json');
  9. const babelify = require('babelify');
  10. module.exports = function (config) {
  11. config.set({
  12. basePath: '',
  13. frameworks: ['browserify', 'jasmine', 'es6-shim'],
  14. browsers: ['PhantomJS'],
  15. files: [
  16. paths.js.entryFile,
  17. './node_modules/node-forge/dist/forge.min.js',
  18. './node_modules/sjcl/sjcl.js',
  19. `${paths.unitTests.baseDir}/mocks/testdata.js`,
  20. `${paths.unitTests.baseDir}/precompute.spec.js`,
  21. ],
  22. preprocessors: {
  23. [paths.js.entryFile] : ['browserify'],
  24. [`${paths.unitTests.baseDir}/**/*.js`] : ['browserify'],
  25. },
  26. browserify: {
  27. debug: true,
  28. transform: [
  29. babelify.configure({
  30. ignore : /(node_modules)/,
  31. presets : ['es2015'],
  32. sourceMaps : true,
  33. }),
  34. ],
  35. extensions: ['.js'],
  36. },
  37. reporters: ['spec'],
  38. singleRun: true,
  39. browserDisconnectTolerance: 1,
  40. browserDisconnectTimeout: 100000,
  41. browserNoActivityTimeout: 100000,
  42. captureTimeout: 100000,
  43. // level of logging
  44. // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN
  45. // || config.LOG_INFO || config.LOG_DEBUG
  46. logLevel: config.LOG_INFO,
  47. });
  48. };