buddy

node MVC discord bot
Log | Files | Refs | README

karma.conf.js (2261B)


      1 // Karma configuration
      2 // Generated on Thu Dec 06 2018 05:35:05 GMT+0200 (Eastern European Standard Time)
      3 
      4 require('dotenv').config();
      5 
      6 
      7 module.exports = function (config) {
      8   config.set({
      9 
     10     // base path that will be used to resolve all patterns (eg. files, exclude)
     11     basePath: '',
     12 
     13 
     14     // frameworks to use
     15     // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
     16     frameworks: ['env', 'mocha', 'chai'],
     17 
     18     client: {
     19       env: {
     20         YOUTUBE_KEY: process.env.YOUTUBE_KEY
     21       },
     22       mocha: {
     23         timeout: 10000
     24       }
     25     },
     26 
     27     // list of files / patterns to load in the browser
     28     files: [
     29       'src/**/*.js',
     30       'test/browser/*.js'
     31     ],
     32 
     33 
     34     // list of files / patterns to exclude
     35     exclude: [],
     36 
     37 
     38     // preprocess matching files before serving them to the browser
     39     // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
     40     preprocessors: {
     41       // add webpack as preprocessor
     42       'src/**/*.js': ['webpack'],
     43       'test/browser/*.js': ['webpack']
     44     },
     45 
     46 
     47     // test results reporter to use
     48     // possible values: 'dots', 'progress'
     49     // available reporters: https://npmjs.org/browse/keyword/karma-reporter
     50     reporters: ['progress'],
     51 
     52     webpackMiddleware: {
     53       // webpack-dev-middleware configuration
     54       // i.e.
     55       noInfo: true,
     56       // and use stats to turn off verbose output
     57       stats: {
     58         // options i.e. 
     59         chunks: false
     60       }
     61     },
     62 
     63     // web server port
     64     port: 9876,
     65 
     66 
     67     // enable / disable colors in the output (reporters and logs)
     68     colors: true,
     69 
     70 
     71     // level of logging
     72     // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
     73     logLevel: config.LOG_INFO,
     74 
     75 
     76     // enable / disable watching file and executing tests whenever any file changes
     77     autoWatch: true,
     78 
     79 
     80     // start these browsers
     81     // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
     82     browsers: ['ChromeHeadless'],
     83 
     84 
     85     // Continuous Integration mode
     86     // if true, Karma captures browsers, runs the tests and exits
     87     singleRun: false,
     88 
     89     // Concurrency level
     90     // how many browser should be started simultaneous
     91     concurrency: Infinity
     92   })
     93 }