|
| 1 | +/* globals basePath:true, files:true, exclude:true, reporters:true, port:true, colors:true, config:true */ |
| 2 | +/* globals autoWatch:true, browsers:true, captureTimeout:true, singleRun:true, reportSlowerThan:true */ |
| 3 | +/* globals LOG_DISABLE, LOG_ERROR, LOG_WARN, LOG_INFO, LOG_DEBUG */ |
| 4 | + |
| 5 | +// Karma configuration |
| 6 | + |
| 7 | +module.exports = function(config) { |
| 8 | + config.set({ |
| 9 | + // base path, that will be used to resolve files and exclude |
| 10 | + basePath: process.cwd(), |
| 11 | + |
| 12 | + //make sure we use karma-jasmine as the test framework |
| 13 | + frameworks: ['jasmine'], |
| 14 | + |
| 15 | + // list of files / patterns to load in the browser |
| 16 | + // angularity will package unit tests and append to the `files` array |
| 17 | + files: [].concat(/*ANGULARITY_FILE_LIST*/), |
| 18 | + |
| 19 | + // list of files to exclude |
| 20 | + exclude: [], |
| 21 | + |
| 22 | + // register any plugins which are not siblings of karma in angularity global |
| 23 | + // installation and thus need to be registered manually |
| 24 | + // append to existing value to preserve plugins loaded automatically |
| 25 | + plugins: [].concat(config.plugins), |
| 26 | + |
| 27 | + // use dots reporter, as travis terminal does not support escaping sequences |
| 28 | + // possible values: 'dots', 'progress', 'junit', 'teamcity' |
| 29 | + reporters: [].concat(/*ANGULARITY_REPORTER_LIST*/), |
| 30 | + |
| 31 | + // web server port |
| 32 | + port: 61658, |
| 33 | + |
| 34 | + // enable / disable colors in the output (reporters and logs) |
| 35 | + colors: true, |
| 36 | + |
| 37 | + // level of logging |
| 38 | + // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG |
| 39 | + logLevel: config.LOG_INFO, |
| 40 | + |
| 41 | + // enable / disable watching file and executing tests whenever any file changes |
| 42 | + autoWatch: false, |
| 43 | + |
| 44 | + // Start these browsers, currently available: |
| 45 | + // - Chrome |
| 46 | + // - ChromeCanary |
| 47 | + // - Firefox |
| 48 | + // - Opera |
| 49 | + // - Safari (only Mac) |
| 50 | + // - PhantomJS |
| 51 | + // - IE (only Windows) |
| 52 | + browsers: ['Chrome'], |
| 53 | + |
| 54 | + // If browser does not capture in given timeout [ms], kill it |
| 55 | + captureTimeout: 5000, |
| 56 | + |
| 57 | + // Auto run tests on start (when browsers are captured) and exit |
| 58 | + singleRun: true, |
| 59 | + |
| 60 | + // report which specs are slower than 500ms |
| 61 | + reportSlowerThan: 500 |
| 62 | + }); |
| 63 | +}; |
| 64 | + |
0 commit comments