cms/drupal/profiles/drustack/libraries/backbone/karma.conf.js
changeset 541 e756a8c72c3d
equal deleted inserted replaced
540:07239de796bb 541:e756a8c72c3d
       
     1 // Note some browser launchers should be installed before using karma start.
       
     2 // For example:
       
     3 // npm install karma-firefox-launcher
       
     4 // karma start --browsers=Firefox
       
     5 module.exports = function(config) {
       
     6   config.set({
       
     7     basePath: '',
       
     8     frameworks: ['qunit'],
       
     9 
       
    10     // list of files / patterns to load in the browser
       
    11     files: [
       
    12         'test/vendor/jquery.js',
       
    13         'test/vendor/json2.js',
       
    14         'test/vendor/underscore.js',
       
    15         'backbone.js',
       
    16         'test/setup/*.js',
       
    17         'test/*.js'
       
    18     ],
       
    19 
       
    20     // test results reporter to use
       
    21     // possible values: 'dots', 'progress'
       
    22     // available reporters: https://npmjs.org/browse/keyword/karma-reporter
       
    23     reporters: ['progress'],
       
    24 
       
    25     // web server port
       
    26     port: 9877,
       
    27 
       
    28     // enable / disable colors in the output (reporters and logs)
       
    29     colors: true,
       
    30 
       
    31     // level of logging
       
    32     // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
       
    33     logLevel: config.LOG_INFO,
       
    34 
       
    35     // enable / disable watching file and executing tests whenever any file changes
       
    36     autoWatch: false,
       
    37 
       
    38     // start these browsers
       
    39     // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
       
    40     browsers: ['PhantomJS'],
       
    41 
       
    42     // Continuous Integration mode
       
    43     // if true, Karma captures browsers, runs the tests and exits
       
    44     singleRun: true,
       
    45 
       
    46     // See http://stackoverflow.com/a/27873086/1517919
       
    47     customLaunchers: {
       
    48         Chrome_sandbox: {
       
    49             base: 'Chrome',
       
    50             flags: ['--no-sandbox']
       
    51         }
       
    52     }
       
    53   });
       
    54 };