UNPKG

1.83 kBJavaScriptView Raw
1module.exports = function(config) {
2 var testWebpackConfig = require('./webpack.test.js');
3
4 var configuration = {
5 basePath: '',
6
7 frameworks: ['jasmine'],
8
9 // list of files to exclude
10 exclude: [],
11
12 /*
13 * list of files / patterns to load in the browser
14 *
15 * we are building the test environment in ./spec-bundle.js
16 */
17 files: [ { pattern: './config/spec-bundle.js', watched: false } ],
18
19 preprocessors: { './config/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] },
20
21 // Webpack Config at ./webpack.test.js
22 webpack: testWebpackConfig,
23
24 coverageReporter: {
25 type: 'in-memory'
26 },
27
28 remapCoverageReporter: {
29 'text-summary': null,
30 json: './coverage/coverage.json',
31 html: './coverage/html'
32 },
33
34 // Webpack please don't spam the console when running in karma!
35 webpackMiddleware: { stats: 'errors-only'},
36
37 reporters: [ 'mocha', 'coverage', 'remap-coverage' ],
38
39 mochaReporter: {
40 ignoreSkipped: true
41 },
42
43 // web server port
44 port: 9876,
45
46 colors: true,
47
48 /*
49 * level of logging
50 * possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
51 */
52 logLevel: config.LOG_INFO,
53
54 autoWatch: false,
55
56 browsers: [
57 'Chrome'
58 ],
59
60 customLaunchers: {
61 ChromeTravisCi: {
62 base: 'Chrome',
63 flags: ['--no-sandbox']
64 }
65 },
66
67 singleRun: true
68 };
69
70 if (process.env.TRAVIS){
71 configuration.browsers = [
72 'ChromeTravisCi'
73 ];
74 }
75
76 config.set(configuration);
77};
\No newline at end of file