|
| 1 | + |
| 2 | +module.exports = function(config) { |
| 3 | + config.set({ |
| 4 | + |
| 5 | + // base path, that will be used to resolve files and exclude |
| 6 | + basePath: '.', |
| 7 | + |
| 8 | + // frameworks to use |
| 9 | + frameworks: ['mocha', 'chai-sinon'], |
| 10 | + |
| 11 | + // list of files / patterns to load in the browser |
| 12 | + files: [ |
| 13 | + 'bower_components/jquery/dist/jquery.min.js', |
| 14 | + 'bower_components/angular/angular.js', |
| 15 | + 'bower_components/angular-mocks/angular-mocks.js', |
| 16 | + 'bower_components/angular-schema-form/dist/schema-form.js', |
| 17 | + 'bower_components/angular-schema-form/dist/bootstrap-decorator.min.js', |
| 18 | + 'bower_components/objectpath/lib/ObjectPath.js', |
| 19 | + 'src/*.js', |
| 20 | + 'src/**/*.html', |
| 21 | + 'test/tests.js' |
| 22 | + ], |
| 23 | + |
| 24 | + // list of files to exclude |
| 25 | + exclude: [ |
| 26 | + |
| 27 | + ], |
| 28 | + |
| 29 | + // test results reporter to use |
| 30 | + // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' |
| 31 | + reporters: ['progress', 'coverage', 'growler'], |
| 32 | + |
| 33 | + preprocessors: { |
| 34 | + 'src/**/*.js': ['coverage'], |
| 35 | + 'src/**/*.html': ['ng-html2js'] |
| 36 | + }, |
| 37 | + |
| 38 | + // optionally, configure the reporter |
| 39 | + coverageReporter: { |
| 40 | + type : 'lcov', |
| 41 | + dir : 'coverage/' |
| 42 | + }, |
| 43 | + |
| 44 | + ngHtml2JsPreprocessor: { |
| 45 | + cacheIdFromPath: function(filepath) { |
| 46 | + return 'directives/decorators/bootstrap/colorpicker/' + filepath.substr(4); |
| 47 | + }, |
| 48 | + moduleName: 'templates' |
| 49 | + }, |
| 50 | + |
| 51 | + // web server port |
| 52 | + port: 9876, |
| 53 | + |
| 54 | + // enable / disable colors in the output (reporters and logs) |
| 55 | + colors: true, |
| 56 | + |
| 57 | + // level of logging |
| 58 | + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG |
| 59 | + logLevel: config.LOG_INFO, |
| 60 | + |
| 61 | + |
| 62 | + // enable / disable watching file and executing tests whenever any file changes |
| 63 | + autoWatch: true, |
| 64 | + |
| 65 | + |
| 66 | + // Start these browsers, currently available: |
| 67 | + // - Chrome |
| 68 | + // - ChromeCanary |
| 69 | + // - Firefox |
| 70 | + // - Opera (has to be installed with `npm install karma-opera-launcher`) |
| 71 | + // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) |
| 72 | + // - PhantomJS |
| 73 | + // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) |
| 74 | + browsers: ['PhantomJS'], |
| 75 | + |
| 76 | + |
| 77 | + // If browser does not capture in given timeout [ms], kill it |
| 78 | + captureTimeout: 60000, |
| 79 | + |
| 80 | + |
| 81 | + // Continuous Integration mode |
| 82 | + // if true, it capture browsers, run tests and exit |
| 83 | + singleRun: false |
| 84 | + }); |
| 85 | +}; |
0 commit comments