|
| 1 | + |
| 2 | +module.exports = (config) -> |
| 3 | + config.set |
| 4 | + # base path that will be used to resolve all patterns (eg. files, exclude) |
| 5 | + basePath: './' |
| 6 | + |
| 7 | + # frameworks to use |
| 8 | + # available frameworks: https://npmjs.org/browse/keyword/karma-adapter |
| 9 | + frameworks: ['jasmine'] |
| 10 | + |
| 11 | + # preprocess matching files before serving them to the browser |
| 12 | + # available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor |
| 13 | + preprocessors: { |
| 14 | + 'spec/**/*.coffee': ['coffee'] |
| 15 | + #'_public/*.js': ['coverage'] |
| 16 | + } |
| 17 | + |
| 18 | + coverageReporter: |
| 19 | + reporters:[ |
| 20 | + { type : 'html', dir : '_public/coverage/', subdir: 'lib' } |
| 21 | + { type : 'cobertura', dir : '_public/coverage/', subdir: 'lib' } |
| 22 | + ] |
| 23 | + |
| 24 | + # list of files / patterns to load in the browser |
| 25 | + files: [ |
| 26 | + 'node_modules/angular/angular.js' |
| 27 | + 'node_modules/angular-mocks/angular-mocks.js' |
| 28 | + 'dist/index.js' |
| 29 | + 'spec/**/*.spec.coffee' |
| 30 | + #do not include those specs for jasmine html runner by karma kama_jasmine_runner.html |
| 31 | + {pattern:'*coffee', included: false} |
| 32 | + ] |
| 33 | + |
| 34 | + # list of files to exclude |
| 35 | + exclude: [ |
| 36 | + ] |
| 37 | + |
| 38 | + # test results reporter to use |
| 39 | + # possible values: 'dots', 'progress' |
| 40 | + # available reporters: https://npmjs.org/browse/keyword/karma-reporter |
| 41 | + # NOTE , TODO 'html' reporter use if you want to hit the karma jasmine runner (frequently causes karma to blow up at the end of run), |
| 42 | + # test results reporter to use |
| 43 | + # possible values: 'dots', 'progress', 'mocha' |
| 44 | + reporters: ['mocha'] |
| 45 | + |
| 46 | + # htmlReporter: |
| 47 | + # middlePathDir: "chrome" |
| 48 | + # outputDir: '_public/karma_html', |
| 49 | + # templatePath: 'spec/karma_jasmine_runner.html' |
| 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: |
| 59 | + # - config.LOG_DISABLE |
| 60 | + # - config.LOG_ERROR |
| 61 | + # - config.LOG_WARN |
| 62 | + # - config.LOG_INFO |
| 63 | + # - config.LOG_DEBUG |
| 64 | + logLevel: config.LOG_INFO |
| 65 | + |
| 66 | + # enable / disable watching file and executing tests whenever any file changes |
| 67 | + autoWatch: false |
| 68 | + |
| 69 | + # start these browsers |
| 70 | + # available browser launchers: https://npmjs.org/browse/keyword/karma-launcher |
| 71 | + browsers: ['PhantomJS']# options Chrome, PhantomJS |
| 72 | + #browserNoActivityTimeout: 200000000000000000000000000000000 |
| 73 | + # If browser does not capture in given timeout [ms], kill it |
| 74 | + captureTimeout: 60000 |
| 75 | + # Continuous Integration mode |
| 76 | + # if true, Karma captures browsers, runs the tests and exits |
| 77 | + singleRun: false |
| 78 | + |
| 79 | + plugins: [ |
| 80 | + 'karma-mocha-reporter' |
| 81 | + 'karma-jasmine' |
| 82 | + 'karma-coverage' |
| 83 | + 'karma-chrome-launcher' |
| 84 | + 'karma-phantomjs-launcher' |
| 85 | + 'karma-coffee-preprocessor' |
| 86 | + ] |
0 commit comments