Skip to content
Snippets Groups Projects
Select Git revision
  • 2.16.4
  • main default protected
  • rc
  • 15-count-variable-outside-group-in-bubble-view
  • 16-pdf-export-clarification
  • beta
  • sprint-1/issue-10
  • feat/histograms
  • feat/update-user-guide
  • feat/caddy-external-config
  • feat/refresh-token
  • feat/exareme2-integration
  • 8.0.x
  • feat/ds-analyse-integration
  • feat/filter-and-formula
  • feat/edit-and-export-unit-result
  • feat/export-result
  • feat/algorithms-integration
  • feat/filter-datasets
  • feat/matomo
  • feat/anova-1way-integration
  • 9.3.0-rc.4
  • 9.3.0
  • 9.3.0-rc.3
  • 9.3.0-rc.2
  • 9.3.0-beta.6
  • 9.3.0-beta.5
  • 9.3.0-beta.4
  • 9.3.0-rc.1
  • 9.3.0-beta.3
  • 9.3.0-beta.2
  • 9.3.0-beta.1
  • 9.2.0
  • 9.1.2
  • 9.1.1
  • 9.1.0
  • 9.1.0-beta.3
  • 9.1.0-beta.2
  • 9.1.0-beta.1
  • 9.0.1-beta.3
  • 9.0.1-beta.2
41 results

karma.conf.js

Blame
  • user avatar
    Panbaba9n authored
    a01a4313
    History
    karma.conf.js 3.01 KiB
    /**
     * Created by Michael DESIGAUD on 11/08/2015.
     */
    // Karma configuration
    // http://karma-runner.github.io/0.12/config/configuration-file.html
    // Generated on 2015-08-11 using
    // generator-karma 0.9.0
    
    
    // Application's main directories constants
    var appConfig = require("./app-config.json");
    // Application's application scripts directories
    var appScripts = require("./scripts-app");
    // Application's vendor scripts directories
    var vendorScripts = require("./scripts-vendor");
    // Application's vendor styles directories
    
    var testFiles = vendorScripts
      .concat(["./node_modules/angular-mocks/angular-mocks.js"])
      .concat(appScripts)
      .concat([
        "./" + appConfig.app + "/tests/**/*.test.js",
        "./" + appConfig.app + "/scripts/**/*.html"
      ]);
    
    module.exports = function(config) {
      "use strict";
      config.set({
        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: true,
    
        // base path, that will be used to resolve files and exclude
        basePath: "./",
    
        // testing framework to use (jasmine/mocha/qunit/...)
        frameworks: ["jasmine"],
    
        // list of files / patterns to load in the browser
        files: testFiles,
    
        // list of files / patterns to exclude
        exclude: [
          "app/tests/e2e/**",
          "app/tests/app/requests/**",
          // "app/tests/app/models/variable_select.test.js",
          // "app/tests/app/header/header.controller.test.js",
          "app/scripts/external/**"
        ],
    
        preprocessors: {
          "app/scripts/**/*.js": ["babel"],
          "app/**/*.html": ["ng-html2js"]
        },
    
        babelPreprocessor: {
          options: {
            presets: ["es2015"],
            sourceMap: "inline"
          }
        },
    
        ngHtml2JsPreprocessor: {
          stripPrefix: "app/",
    
          moduleName: "karmaTemplates"
        },
    
        // web server port
        port: 9999,
    
        // Start these browsers, currently available:
        // - Chrome
        // - ChromeCanary
        // - Firefox
        // - Opera
        // - Safari (only Mac)
        // - PhantomJS
        // - IE (only Windows)
        browsers: ["PhantomJS"],
        // reporters: ["junit", "dots", "coverage"],
        reporters: ["junit", "dots", "coverage"],
        junitReporter: {
          outputDir: "reports",
          outputFile: "test-results.xml"
        },
        coverageReporter: {
          type: "cobertura",
          dir: "reports/",
          file: "coverage-results.xml"
        },
    
        // Which plugins to enable
        // plugins: [
        //   "karma-phantomjs-launcher",
        //   "karma-jasmine",
        //   "karma-junit-reporter",
        //   "karma-coverage",
        //   "karma-ng-html2js-preprocessor"
        // ],
    
        // Continuous Integration mode
        // if true, it capture browsers, run tests and exit
        singleRun: false,
    
        colors: true,
    
        // level of logging
        // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
        logLevel: config.LOG_INFO
    
        // Uncomment the following lines if you are using grunt's server to run the tests
    
        // proxies: {
    
        //   '/': 'http://localhost:9000/'
    
        // },
    
        // URL root prevent conflicts with the site root
    
        // urlRoot: '_karma_'
      });
    };