diff options
Diffstat (limited to 'node_modules/istanbul-reports/lib/lcov')
-rw-r--r-- | node_modules/istanbul-reports/lib/lcov/index.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/node_modules/istanbul-reports/lib/lcov/index.js b/node_modules/istanbul-reports/lib/lcov/index.js new file mode 100644 index 000000000..97e34c977 --- /dev/null +++ b/node_modules/istanbul-reports/lib/lcov/index.js @@ -0,0 +1,29 @@ +/* + Copyright 2012-2015, Yahoo Inc. + Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. + */ +var LcovOnlyReport = require('../lcovonly'), + HtmlReport = require('../html'); + +function LcovReport() { + this.lcov = new LcovOnlyReport({file: 'lcov.info'}); + this.html = new HtmlReport({ subdir: 'lcov-report'}); +} + +['Start', 'End', 'Summary', 'SummaryEnd', 'Detail'].forEach(function (what) { + var meth = 'on' + what; + LcovReport.prototype[meth] = function () { + var args = Array.prototype.slice.call(arguments), + lcov = this.lcov, + html = this.html; + + if (lcov[meth]) { + lcov[meth].apply(lcov, args); + } + if (html[meth]) { + html[meth].apply(html, args); + } + }; +}); + +module.exports = LcovReport; |