1 | // Karma configuration
|
2 | // Generated on Wed Mar 25 2015 21:28:22 GMT+0000 (GMT)
|
3 |
|
4 | module.exports = function (config) {
|
5 | config.set({
|
6 |
|
7 | // base path that will be used to resolve all patterns (eg. files, exclude)
|
8 | basePath: '',
|
9 |
|
10 |
|
11 | // frameworks to use
|
12 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
13 | frameworks: ['jasmine'],
|
14 |
|
15 |
|
16 | // list of files / patterns to load in the browser
|
17 | files: [
|
18 | 'src/lokijs.js',
|
19 | 'spec/helpers/assert-helpers.js',
|
20 | 'spec/generic/*.js',
|
21 | 'spec/browser/*.js'
|
22 | ],
|
23 |
|
24 |
|
25 | // list of files to exclude
|
26 | exclude: [],
|
27 |
|
28 |
|
29 | // preprocess matching files before serving them to the browser
|
30 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
31 | preprocessors: {
|
32 | // source files, that you wanna generate coverage for
|
33 | // do not include tests or libraries
|
34 | // (these files will be instrumented by Istanbul)
|
35 | 'src/**/*.js': ['coverage']
|
36 | },
|
37 |
|
38 |
|
39 | // test results reporter to use
|
40 | // possible values: 'dots', 'progress'
|
41 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
42 | // coverage reporter generates the coverage
|
43 | reporters: ['dots', 'coverage'],
|
44 |
|
45 | // optionally, configure the reporter
|
46 | coverageReporter: {
|
47 | type: 'html',
|
48 | dir: 'coverage/'
|
49 | },
|
50 |
|
51 |
|
52 | // web server port
|
53 | port: 9876,
|
54 |
|
55 | hostname: 'localhost',
|
56 |
|
57 |
|
58 | // enable / disable colors in the output (reporters and logs)
|
59 | colors: true,
|
60 |
|
61 |
|
62 | // level of logging
|
63 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
64 | logLevel: config.LOG_INFO,
|
65 |
|
66 |
|
67 | // enable / disable watching file and executing tests whenever any file changes
|
68 | autoWatch: true,
|
69 |
|
70 |
|
71 | // start these browsers
|
72 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
73 | browsers: ['PhantomJS'],
|
74 |
|
75 |
|
76 | // Continuous Integration mode
|
77 | // if true, Karma captures browsers, runs the tests and exits
|
78 | singleRun: false
|
79 | });
|
80 | };
|