1 | // Karma configuration
|
2 | // Generated on Fri Nov 07 2014 08:13:06 GMT-0500 (EST)
|
3 |
|
4 | module.exports = function(config) {
|
5 | var testReportsPath = process.env.CIRCLE_TEST_REPORTS || '.';
|
6 |
|
7 | config.set({
|
8 |
|
9 | // base path that will be used to resolve all patterns (eg. files, exclude)
|
10 | basePath: '',
|
11 |
|
12 |
|
13 | // frameworks to use
|
14 | // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
15 | frameworks: ['mocha', 'browserify', 'sinon-chai', 'phantomjs-shim', 'source-map-support'],
|
16 |
|
17 | // list of files / patterns to load in the browser
|
18 | files: ['node_modules/jquery/dist/jquery.min.js', 'test/bootstrap.js', './src/js/bootstrap.js', 'test/specs/**/*.spec.js'],
|
19 |
|
20 |
|
21 | // list of files to exclude
|
22 | exclude: [],
|
23 |
|
24 |
|
25 | // preprocess matching files before serving them to the browser
|
26 | // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
27 | preprocessors: {
|
28 | 'test/bootstrap.js': ['browserify'],
|
29 | './src/js/bootstrap.js': ['browserify'],
|
30 | 'test/specs/*.spec.js': ['browserify']
|
31 | },
|
32 |
|
33 |
|
34 | // test results reporter to use
|
35 | // possible values: 'dots', 'progress'
|
36 | // available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
37 | reporters: ['progress', 'junit'],
|
38 |
|
39 | // the default configuration
|
40 | junitReporter: {
|
41 | outputFile: testReportsPath + '/junit/test-results.xml',
|
42 | suite: ''
|
43 | },
|
44 |
|
45 |
|
46 | // web server port
|
47 | port: 9876,
|
48 |
|
49 |
|
50 | // enable / disable colors in the output (reporters and logs)
|
51 | colors: true,
|
52 |
|
53 |
|
54 | // level of logging
|
55 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
56 | logLevel: config.LOG_INFO,
|
57 |
|
58 |
|
59 | // enable / disable watching file and executing tests whenever any file changes
|
60 | autoWatch: true,
|
61 |
|
62 |
|
63 | // start these browsers
|
64 | // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
65 | browsers: ['PhantomJS'],
|
66 |
|
67 |
|
68 | // Continuous Integration mode
|
69 | // if true, Karma captures browsers, runs the tests and exits
|
70 | singleRun: true,
|
71 |
|
72 | browserify: {
|
73 | debug: true // include inline source maps
|
74 | }
|
75 | });
|
76 | };
|