karma-base.conf.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. module.exports = function(params) {
  2. "use strict";
  3. console.log("Vendor files: " + params.vendor.join(", "));
  4. return function(config) {
  5. return config.set({
  6. basePath: "",
  7. frameworks: ["mocha", "chai"],
  8. files: Array.prototype.concat([
  9. "node_modules/sinon/lib/sinon.js",
  10. "node_modules/sinon/lib/sinon/spy.js",
  11. "node_modules/sinon/lib/sinon/stub.js",
  12. "node_modules/sinon-chai/lib/sinon-chai.js"],
  13. params.vendor,
  14. params.src || "bootbox.js",
  15. ["tests/**/*.test.coffee",
  16. "tests/**/*.test.js"]
  17. ),
  18. exclude: [],
  19. preprocessors: {
  20. "**/*.coffee": ["coffee"],
  21. "bootbox.js": ["coverage"]
  22. },
  23. reporters: ["dots", "coverage", "junit"],
  24. port: 9876,
  25. colors: true,
  26. logLevel: config.LOG_INFO,
  27. autoWatch: true,
  28. browsers: ["PhantomJS"],
  29. captureTimeout: 60000,
  30. singleRun: true,
  31. coverageReporter: {
  32. type: "html",
  33. dir: "tests/coverage"
  34. },
  35. junitReporter: {
  36. outputFile: "tests/reports/results.xml"
  37. }
  38. });
  39. };
  40. };