BVB Source Codes

angular-starter Show karma.conf.js Source code

Return Download angular-starter: download karma.conf.js Source code - Download angular-starter Source code - Type:.js
  1. /**
  2.  * @author: @AngularClass
  3.  */
  4.  
  5. module.exports = function (config) {
  6.   var testWebpackConfig = require('./webpack.test.js')({ env: 'test' });
  7.  
  8.   var configuration = {
  9.  
  10.     /**
  11.      * Base path that will be used to resolve all patterns (e.g. files, exclude).
  12.     */
  13.     basePath: '',
  14.  
  15.     /**
  16.      * Frameworks to use
  17.      *
  18.      * available frameworks: https://npmjs.org/browse/keyword/karma-adapter
  19.      */
  20.     frameworks: ['jasmine'],
  21.  
  22.     /**
  23.      * List of files to exclude.
  24.     */
  25.     exclude: [],
  26.  
  27.     client: {
  28.       captureConsole: false
  29.     },
  30.  
  31.     /**
  32.      * List of files / patterns to load in the browser
  33.      *
  34.      * we are building the test environment in ./spec-bundle.js
  35.      */
  36.     files: [
  37.       { pattern: './config/spec-bundle.js', watched: false },
  38.       { pattern: './src/assets/**/*', watched: false, included: false, served: true, nocache: false }
  39.     ],
  40.  
  41.     /**
  42.      * By default all assets are served at http://localhost:[PORT]/base/
  43.      */
  44.     proxies: {
  45.       "/assets/": "/base/src/assets/"
  46.     },
  47.  
  48.     /**
  49.      * Preprocess matching files before serving them to the browser
  50.      * available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
  51.      */
  52.     preprocessors: { './config/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] },
  53.  
  54.     /**
  55.      * Webpack Config at ./webpack.test.js
  56.      */
  57.     webpack: testWebpackConfig,
  58.  
  59.     coverageReporter: {
  60.       type: 'in-memory'
  61.     },
  62.  
  63.     remapCoverageReporter: {
  64.       'text-summary': null,
  65.       json: './coverage/coverage.json',
  66.       html: './coverage/html'
  67.     },
  68.  
  69.     /**
  70.      * Webpack please don't spam the console when running in karma!
  71.      */
  72.     webpackMiddleware: {
  73.       /**
  74.        * webpack-dev-middleware configuration
  75.        * i.e.
  76.        */
  77.       noInfo: true,
  78.       /**
  79.        * and use stats to turn off verbose output
  80.        */
  81.       stats: {
  82.         /**
  83.          * options i.e.
  84.          */
  85.         chunks: false
  86.       }
  87.     },
  88.  
  89.     /**
  90.      * Test results reporter to use
  91.      *
  92.      * possible values: 'dots', 'progress'
  93.      * available reporters: https://npmjs.org/browse/keyword/karma-reporter
  94.      */
  95.     reporters: ['mocha', 'coverage', 'remap-coverage'],
  96.  
  97.     /**
  98.      * Web server port.
  99.      */
  100.     port: 9876,
  101.  
  102.     /**
  103.      * enable / disable colors in the output (reporters and logs)
  104.      */
  105.     colors: true,
  106.  
  107.     /**
  108.      * Level of logging
  109.      * possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
  110.      */
  111.     logLevel: config.LOG_WARN,
  112.  
  113.     /**
  114.      * enable / disable watching file and executing tests whenever any file changes
  115.      */
  116.     autoWatch: false,
  117.  
  118.     /**
  119.      * start these browsers
  120.      * available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
  121.      */
  122.     browsers: [
  123.       'Chrome'
  124.     ],
  125.  
  126.     customLaunchers: {
  127.       ChromeTravisCi: {
  128.         base: 'Chrome',
  129.         flags: ['--no-sandbox']
  130.       }
  131.     },
  132.  
  133.     /**
  134.      * Continuous Integration mode
  135.      * if true, Karma captures browsers, runs the tests and exits
  136.      */
  137.     singleRun: true
  138.   };
  139.  
  140.   if (process.env.TRAVIS) {
  141.     configuration.browsers = [
  142.       'ChromeTravisCi'
  143.     ];
  144.   }
  145.  
  146.   config.set(configuration);
  147. };
  148.  
downloadkarma.conf.js Source code - Download angular-starter Source code
Related Source Codes/Software:
django-rest-framework - Web APIs for Django. http:/... 2017-06-10
lectures - Oxford Deep NLP 2017 course 2017-06-10
algorithms - Minimal examples of data structures and algorithms... 2017-06-10
Awesome-Hacking - A collection of various awesome lists for hackers,... 2017-06-09
lottie-ios - An iOS library to natively render After Effects ve... 2017-06-09
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
angular-starter - 2017-06-10

 Back to top