UNPKG

2.27 kBJavaScriptView Raw
1// Karma configuration
2// Generated on Fri Nov 07 2014 08:13:06 GMT-0500 (EST)
3
4module.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', './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 './src/js/bootstrap.js': ['browserify'],
29 'test/specs/*.spec.js': ['browserify']
30 },
31
32
33 // test results reporter to use
34 // possible values: 'dots', 'progress'
35 // available reporters: https://npmjs.org/browse/keyword/karma-reporter
36 reporters: ['progress', 'junit'],
37
38 // the default configuration
39 junitReporter: {
40 outputFile: testReportsPath + '/junit/test-results.xml',
41 suite: ''
42 },
43
44
45 // web server port
46 port: 9876,
47
48
49 // enable / disable colors in the output (reporters and logs)
50 colors: true,
51
52
53 // level of logging
54 // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
55 logLevel: config.LOG_INFO,
56
57
58 // enable / disable watching file and executing tests whenever any file changes
59 autoWatch: true,
60
61
62 // start these browsers
63 // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
64 browsers: ['PhantomJS'],
65
66
67 // Continuous Integration mode
68 // if true, Karma captures browsers, runs the tests and exits
69 singleRun: true,
70
71 browserify: {
72 debug: true // include inline source maps
73 }
74 });
75};