1 // Karma configuration |
|
2 // Generated on Wed Jan 29 2014 15:32:16 GMT+0100 (CET) |
|
3 |
|
4 |
|
5 // SID: get WORKSPACE_URL configuration from one single file to customize |
|
6 var w = require ('./workspace.info.js'); |
|
7 |
|
8 module.exports = function(config) { |
|
9 config.set({ |
|
10 // list of files or patterns to load in the browser, from current directory |
|
11 files: [ |
|
12 {pattern: 'tests/**/*.js', included: true} |
|
13 ], |
|
14 // list of files to exclude |
|
15 exclude: [ |
|
16 ], |
|
17 // Start these browsers, currently available: |
|
18 // - Firefox ; Safari (only Mac; run `npm install karma-safari-launcher` first) |
|
19 // - Chrome ; ChromeCanary ; Opera (run `npm install karma-opera-launcher` first) |
|
20 // - PhantomJS ; IE (only Windows; run `npm install karma-ie-launcher` first) |
|
21 browsers: w.BROWSERS, |
|
22 // frameworks to use. SID: choosen mocha, added karma-e2e-dsl (end-to-end testing) |
|
23 frameworks: ['mocha', 'karma-e2e-dsl'], |
|
24 // SID: Karma will start and run somewhere else than '/', to allow proxying '/' |
|
25 urlRoot: '/karma/', |
|
26 // SID: directive added on karma-e2e-dsl purpose. Map of path-proxy pairs. |
|
27 proxies: { |
|
28 '/': w.WORKSPACE_URL |
|
29 }, |
|
30 client: { |
|
31 mocha: { |
|
32 ui: 'tdd' |
|
33 }, |
|
34 w: w // SID: exports the variable in the test execution browser window |
|
35 }, |
|
36 // test results reporter to use : 'dots', 'progress', 'junit', 'growl', 'coverage' |
|
37 reporters: ['progress'], |
|
38 // web server port |
|
39 port: 9876, |
|
40 // enable / disable colors in the output (reporters and logs) |
|
41 colors: true, |
|
42 // level of logging : config.LOG_DISABLE || _ERROR || _WARN || _INFO || _DEBUG |
|
43 logLevel: config.LOG_INFO || config.LOG_DEBUG, |
|
44 // enable / disable watching file and executing tests whenever any file changes |
|
45 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 |
|
49 // singleRun: false |
|
50 singleRun: true, |
|
51 }); |
|
52 }; |
|