1 // Karma configuration |
1 // Karma configuration |
2 // Generated on Wed Jan 29 2014 15:32:16 GMT+0100 (CET) |
2 // Generated on Wed Jan 29 2014 15:32:16 GMT+0100 (CET) |
3 |
3 |
4 |
4 |
5 // SID: get WORKSPACE_URL configuration from one single file to customize |
5 // SID: get WORKSPACE_URL configuration from one single file to customize |
6 var w = require ('./workspace.info.full.js'); |
6 var w = require ('./workspace.info.full.js'), |
|
7 t = require ('./lib/test_hlp.js'); |
7 |
8 |
8 module.exports = function(config) { |
9 module.exports = function(config) { |
9 config.set({ |
10 config.set({ |
10 // list of files or patterns to load in the browser, from current directory |
11 // list of files or patterns to load in the browser, from current directory |
11 files: [ |
12 files: [ |
29 }, |
30 }, |
30 client: { |
31 client: { |
31 mocha: { |
32 mocha: { |
32 ui: 'tdd' |
33 ui: 'tdd' |
33 }, |
34 }, |
34 w: w // SID: exports the variable in the test execution browser window |
35 w: w, // SID: exports the variable in the test execution browser window |
|
36 // SID: we can't pass living functions to testing (mocha) browser environment |
|
37 // so we convert them to string, and send also a string body of a reviving function |
|
38 // closures are lost in the process, that's ok. |
|
39 t: JSON.stringify (t, function (k, v) { return typeof v === 'function' ? v.toString () : v }), |
|
40 r: t.reviveFunc |
35 }, |
41 }, |
36 // test results reporter to use : 'dots', 'progress', 'junit', 'growl', 'coverage' |
42 // test results reporter to use : 'dots', 'progress', 'junit', 'growl', 'coverage' |
37 reporters: ['progress'], |
43 reporters: ['progress'], |
38 // web server port |
44 // web server port |
39 port: 9876, |
45 port: 9876, |
40 // enable / disable colors in the output (reporters and logs) |
46 // enable / disable colors in the output (reporters and logs) |
41 colors: true, |
47 colors: true, |
42 // level of logging : config.LOG_DISABLE || _ERROR || _WARN || _INFO || _DEBUG |
48 // level of logging : config.LOG_DISABLE || _ERROR || _WARN || _INFO || _DEBUG |
43 logLevel: config.LOG_INFO || config.LOG_DEBUG, |
49 logLevel: config.LOG_INFO, |
|
50 // If browser does not capture in given timeout [ms], kill it |
|
51 captureTimeout: 9999, |
44 // enable / disable watching file and executing tests whenever any file changes |
52 // enable / disable watching file and executing tests whenever any file changes |
45 autoWatch: false, |
53 autoWatch: false, |
46 // If browser does not capture in given timeout [ms], kill it |
|
47 captureTimeout: 20000, |
|
48 // Continuous Integration mode : if true, it capture browsers, run tests and exit |
54 // Continuous Integration mode : if true, it capture browsers, run tests and exit |
49 // singleRun: false |
|
50 singleRun: true, |
55 singleRun: true, |
51 }); |
56 }); |
52 }; |
57 }; |