1 | module.exports = function(config) {
|
2 |
|
3 | 'use strict';
|
4 |
|
5 | config.set({
|
6 | autoWatch: false,
|
7 |
|
8 | basePath: './',
|
9 |
|
10 | browsers: ['PhantomJS'],
|
11 |
|
12 | browserify: {
|
13 | transform: ['browserify-istanbul'],
|
14 | configure: function(bundle) {
|
15 | bundle.on('prebundle', function() {
|
16 | bundle.ignore('mocha');
|
17 | });
|
18 | },
|
19 | debug: true
|
20 | },
|
21 |
|
22 | browserNoActivityTimeout: 100000,
|
23 |
|
24 | captureConsole: true,
|
25 |
|
26 | colors: true,
|
27 |
|
28 | coverageReporter: {
|
29 | check: {
|
30 | global: {
|
31 | statements: 95,
|
32 | branches: 94,
|
33 | functions: 95,
|
34 | lines: 95
|
35 | }
|
36 | },
|
37 | reporters: [{ type: 'text' }]
|
38 | },
|
39 |
|
40 | files: [
|
41 | 'lib/leche.js',
|
42 | 'tests/lib/leche-test.js'
|
43 | ],
|
44 |
|
45 | frameworks: ['mocha', 'sinon-chai', 'browserify'],
|
46 |
|
47 | phantomjsLauncher: {
|
48 | exitOnResourceError: true
|
49 | },
|
50 |
|
51 | preprocessors: {
|
52 | 'lib/leche.js': ['browserify'],
|
53 | 'tests/lib/leche-test.js': ['browserify']
|
54 | },
|
55 |
|
56 | plugins: [
|
57 | 'karma-mocha',
|
58 | 'karma-sinon-chai',
|
59 | 'karma-browserify',
|
60 | 'karma-coverage',
|
61 | 'karma-phantomjs-launcher'
|
62 | ],
|
63 |
|
64 | port: 9876,
|
65 |
|
66 | reporters: ['progress', 'coverage'],
|
67 |
|
68 | singleRun: true
|
69 | });
|
70 | };
|