allow for preprocessing templates in unit tests

Signed-off-by: Florian Kraft <f.kraft@finn.de>
pull/3245/head
Florian Kraft 9 years ago
parent ee4c8cfa14
commit 86a6545972
  1. 4
      frontend/karma.conf.js
  2. 1
      frontend/package.json

@ -84,9 +84,13 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'/templates/**/*.html': ['ng-html2js'],
'../app/assets/javascripts/*.js': ['coverage'],
'app/**/*.js': ['webpack'] // coverage disabled
},
ngHtml2JsPreprocessor: {
module: 'openproject.templates'
},
// test results reporter to use

@ -29,6 +29,7 @@
"karma-firefox-launcher": "~0.1.3",
"karma-junit-reporter": "~0.2.2",
"karma-mocha": "~0.1.3",
"karma-ng-html2js-preprocessor": "^0.1.2",
"karma-phantomjs-launcher": "~0.1.4",
"karma-webpack": "^1.5.0",
"mocha": "~1.18.2",

Loading…
Cancel
Save