diff options
author | Indrajith K L | 2017-12-18 17:02:00 +0530 |
---|---|---|
committer | Indrajith K L | 2017-12-18 17:02:00 +0530 |
commit | 22e4705a9cde1ec45fac032721af6d47ef60566b (patch) | |
tree | b2da1d0f49c725e3032ed1ad14b2118d2c3ca482 /karma.conf.js | |
download | vanilla-yo-notification-22e4705a9cde1ec45fac032721af6d47ef60566b.tar.gz vanilla-yo-notification-22e4705a9cde1ec45fac032721af6d47ef60566b.tar.bz2 vanilla-yo-notification-22e4705a9cde1ec45fac032721af6d47ef60566b.zip |
initial commit
Diffstat (limited to 'karma.conf.js')
-rw-r--r-- | karma.conf.js | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..5ebe9d0 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,61 @@ +var webpackConf = require('./webpack.config.js'); +module.exports = function (config) { + config.set({ + basePath:'', + frameworks: ['jasmine'], + files: [{ pattern: './tests/unit/spec-bundle.js', watched: false }], + preprocessors: { './tests/unit/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] }, + webpack: { + module: webpackConf.module, + resolve: webpackConf.resolve + }, + webpackMiddleware: { + noInfo: true, + stats: 'errors-only' + }, + reporters: ['kjhtml', 'spec', 'coverage'], + // optionally, configure the reporter + coverageReporter: { + // specify a common output directory + dir: './tests/build/reports/coverage', + reporters: [ + // reporters not supporting the `file` property + { type: 'html', subdir: 'report-html' }, + { type: 'lcov', subdir: 'report-lcov' }, + // reporters supporting the `file` property, use `subdir` to directly + // output them in the `dir` directory + { type: 'cobertura', subdir: '.', file: 'cobertura.txt' }, + { type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }, + { type: 'teamcity', subdir: '.', file: 'teamcity.txt' }, + { type: 'text', subdir: '.', file: 'text.txt' }, + { type: 'text-summary', subdir: '.', file: 'text-summary.txt' }, + ] + }, + specReporter: { + maxLogLines: 5, // limit number of lines logged per test + suppressErrorSummary: true, // do not print error summary + suppressFailed: false, // do not print information about failed tests + suppressPassed: false, // do not print information about passed tests + suppressSkipped: true, // do not print information about skipped tests + showSpecTiming: false // print the time elapsed for each spec + }, + customLaunchers: { + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }, + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: true, + concurrency: Infinity + }); + + + if (process.env.TRAVIS) { + config.browsers = ['Chrome_travis_ci']; + } +}; |