karma.conf.js - Load partials (crmResource) and timeentry
authorTim Otten <totten@civicrm.org>
Sat, 14 Feb 2015 02:46:27 +0000 (18:46 -0800)
committerTim Otten <totten@civicrm.org>
Sat, 14 Feb 2015 03:53:49 +0000 (19:53 -0800)
package.json
tests/karma.conf.js

index 61e7bdb36a78d6a023ff884554339a0bf7fb6bcc..0903daf62e4b6eb009f3d27d7a13addade20ffe1 100644 (file)
@@ -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"
   },
index f65258730f32a75c8c1ce3af20590fa6ad29d9df..ff8d6c3f3878941db7b5d33e99c1520b6b378682 100644 (file)
@@ -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,