From: Tim Otten Date: Sat, 14 Feb 2015 02:46:27 +0000 (-0800) Subject: karma.conf.js - Load partials (crmResource) and timeentry X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=401f6f823727a6d3d210963f197d5e135cce7566;p=civicrm-core.git karma.conf.js - Load partials (crmResource) and timeentry --- diff --git a/package.json b/package.json index 61e7bdb36a..0903daf62e 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "bower": "^1.3.1", "karma": "^0.12.16", "karma-chrome-launcher": "^0.1.4", + "karma-ng-html2js-preprocessor": "^0.1.2", "jasmine-core": "~2.1.2", "karma-jasmine": "~0.3.2" }, diff --git a/tests/karma.conf.js b/tests/karma.conf.js index f65258730f..ff8d6c3f38 100644 --- a/tests/karma.conf.js +++ b/tests/karma.conf.js @@ -12,6 +12,7 @@ module.exports = function(config) { 'packages/jquery/plugins/select2/select2.min.js', 'packages/jquery/plugins/jquery.blockUI.js', 'packages/jquery/plugins/jquery.validate.js', + 'packages/jquery/plugins/jquery.timeentry.js', 'js/Common.js', 'bower_components/angular/angular.js', 'bower_components/angular-file-upload/angular-file-upload.js', @@ -26,7 +27,17 @@ module.exports = function(config) { 'js/angular-*.js', 'tests/karma/lib/*.js', 'tests/karma/**/*.js', + 'partials/**/*.html' ], + preprocessors : { + 'partials/**/*.html' : ['ng-html2js'] + }, + + ngHtml2JsPreprocessor: { + stripPrefix: 'partials/', + prependPrefix: '~/', + moduleName: 'crmResource' + }, frameworks: ['jasmine'], logLevel: config.LOG_INFO, port: 9876,