Created
January 30, 2017 21:41
-
-
Save honzabrecka/398c8bab56829648581e2b4fd534fc1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = function(config) { | |
| var root = 'target/public/dev'// same as :output-dir | |
| config.set({ | |
| frameworks: ['cljs-test'], | |
| files: [ | |
| root + '/goog/base.js', | |
| root + '/cljs_deps.js', | |
| root + '/app.js',// same as :output-to | |
| {pattern: root + '/*.js', included: false}, | |
| {pattern: root + '/**/*.js', included: false} | |
| ], | |
| client: { | |
| // main function | |
| args: ['app.test_runner.run'] | |
| }, | |
| // singleRun set to false does not work! | |
| singleRun: true, | |
| // ------------------ | |
| // coverage | |
| // ------------------ | |
| reporters: ['progress', 'coverage'], | |
| coverageReporter: { | |
| dir: 'target/coverage', | |
| reporters: [ | |
| // cljs->js coverage (just in case you are curious as I am) | |
| {type: 'html', subdir: 'report-html'}, | |
| // run | |
| // ./node_modules/.bin/remap-istanbul -i target/coverage/report-json/coverage.json -o target/coverage/report-html-final -t html | |
| // to generate cljs code coverage | |
| {type: 'json', subdir: 'report-json', file: 'coverage.json'} | |
| ] | |
| }, | |
| // collect coverage only for my code | |
| // (as I'm not interested in goog, cljs, clojure, etc. namespaces/dirs) | |
| preprocessors: { | |
| 'target/public/dev/<root_namespace>/**/*.js': ['coverage'] | |
| }, | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment