Commits
William Welling authored a6e8e843a29
30 30 | require('karma-phantomjs-launcher'), |
31 31 | require('karma-webdriver-launcher'), |
32 32 | require('karma-coverage'), |
33 33 | require('karma-mocha-reporter'), |
34 34 | require('karma-remap-istanbul'), |
35 35 | require('karma-sourcemap-loader'), |
36 36 | require('karma-webpack') |
37 37 | ], |
38 38 | |
39 39 | // list of files to exclude |
40 - | exclude: [ ], |
40 + | exclude: [], |
41 41 | |
42 42 | /* |
43 43 | * list of files / patterns to load in the browser |
44 44 | * |
45 45 | * we are building the test environment in ./spec-bundle.js |
46 46 | */ |
47 - | files: [ { pattern: './spec-bundle.js', watched: false } ], |
47 + | files: [ |
48 + | { |
49 + | pattern: './spec-bundle.js', |
50 + | watched: false |
51 + | } |
52 + | ], |
48 53 | |
49 54 | /* |
50 55 | * preprocess matching files before serving them to the browser |
51 56 | * available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
52 57 | */ |
53 - | preprocessors: { './spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] }, |
58 + | preprocessors: { |
59 + | './spec-bundle.js': ['coverage', 'webpack', 'sourcemap'] |
60 + | }, |
54 61 | |
55 62 | // Webpack Config at ./webpack.test.js |
56 63 | webpack: testWebpackConfig, |
57 64 | |
58 65 | coverageReporter: { |
59 - | reporters:[ |
60 - | {type: 'in-memory'}, |
61 - | {type: 'json', subdir: '.', file: 'coverage-final.json'}, |
62 - | {type: 'html', dir : 'coverage/'} |
66 + | reporters: [ |
67 + | { |
68 + | type: 'in-memory' |
69 + | }, { |
70 + | type: 'json', |
71 + | subdir: '.', |
72 + | file: 'coverage-final.json' |
73 + | }, { |
74 + | type: 'html', |
75 + | dir: 'coverage/' |
76 + | } |
63 77 | ] |
64 78 | }, |
65 79 | |
66 80 | remapCoverageReporter: { |
67 81 | 'text-summary': null, |
68 82 | json: './coverage/coverage.json', |
69 83 | html: './coverage/html' |
70 84 | }, |
71 85 | |
72 86 | remapIstanbulReporter: { |
73 87 | reports: { |
74 88 | html: 'coverage' |
75 89 | } |
76 90 | }, |
77 91 | |
78 92 | // Webpack please don't spam the console when running in karma! |
79 - | webpackMiddleware: { stats: 'errors-only'}, |
93 + | webpackMiddleware: { |
94 + | stats: 'errors-only' |
95 + | }, |
80 96 | |
81 97 | /* |
82 98 | * test results reporter to use |
83 99 | * |
84 100 | * possible values: 'dots', 'progress' |
85 101 | * available reporters: https://npmjs.org/browse/keyword/karma-reporter |
86 102 | */ |
87 - | reporters: [ 'mocha', 'coverage', 'karma-remap-istanbul' ], |
103 + | reporters: [ |
104 + | 'mocha', 'coverage', 'karma-remap-istanbul' |
105 + | ], |
88 106 | |
89 107 | // Karma web server port |
90 108 | port: 9876, |
91 109 | |
92 110 | // enable / disable colors in the output (reporters and logs) |
93 111 | colors: true, |
94 112 | |
95 113 | /* |
96 114 | * level of logging |
97 115 | * possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
127 145 | // Remote Selenium Server with Firefox - launcher |
128 146 | 'SeleniumFirefox': { |
129 147 | base: 'WebDriver', |
130 148 | config: webdriverConfig, |
131 149 | browserName: 'firefox' |
132 150 | } |
133 151 | }, |
134 152 | |
135 153 | mochaReporter: { |
136 154 | ignoreSkipped: true |
137 - | } |
155 + | }, |
156 + | |
157 + | browserNoActivityTimeout: 30000 |
138 158 | |
139 159 | /* |
140 160 | * Continuous Integration mode |
141 161 | * if true, Karma captures browsers, runs the tests and exits |
142 162 | */ |
143 163 | //singleRun: true |
144 164 | }; |
145 165 | |
146 - | if (process.env.TRAVIS){ |
147 - | configuration.browsers = [ |
148 - | 'ChromeTravisCi' |
149 - | ]; |
166 + | if (process.env.TRAVIS) { |
167 + | configuration.browsers = ['ChromeTravisCi']; |
150 168 | } |
151 169 | |
152 170 | config.set(configuration); |
153 171 | }; |