a b/test/config/karma.conf.js
1
'use strict';
2
3
module.exports = function(config) {
4
  config.set({
5
    basePath: '../../',
6
    files: [
7
      'frontend/components/chai/chai.js',
8
      'node_modules/chai-shallow-deep-equal/chai-shallow-deep-equal.js',
9
      'frontend/components/jquery/dist/jquery.min.js',
10
      'frontend/components/angular/angular.min.js',
11
      'frontend/components/angular-ui-router/release/angular-ui-router.min.js',
12
      'frontend/components/angular-mocks/angular-mocks.js',
13
      'frontend/components/dynamic-directive/dist/dynamic-directive.min.js',
14
      'frontend/js/**/*.js',
15
      'test/unit-frontend/**/*.js',
16
      'frontend/views/**/*.jade'
17
    ],
18
    frameworks: ['mocha'],
19
    colors: true,
20
    singleRun: true,
21
    autoWatch: true,
22
    browsers: ['PhantomJS', 'Chrome', 'Firefox'],
23
    reporters: ['coverage', 'spec'],
24
    preprocessors: {
25
      'frontend/js/**/*.js': ['coverage'],
26
      '**/*.jade': ['ng-jade2module']
27
    },
28
29
    plugins: [
30
      'karma-phantomjs-launcher',
31
      'karma-chrome-launcher',
32
      'karma-firefox-launcher',
33
      'karma-mocha',
34
      'karma-coverage',
35
      'karma-spec-reporter',
36
      'karma-ng-jade2module-preprocessor'
37
    ],
38
39
    coverageReporter: {type: 'text', dir: '/tmp'},
40
41
    ngJade2ModulePreprocessor: {
42
      stripPrefix: 'frontend',
43
      prependPrefix: '/linagora.esn.gsafe',
44
      // setting this option will create only a single module that contains templates
45
      // from all the files, so you can load them all with module('templates')
46
      jadeRenderConfig: {
47
        __: function(str) {
48
          return str;
49
        }
50
      },
51
      moduleName: 'jadeTemplates'
52
    }
53
54
  });
55
};