source: trip-planner-front/node_modules/istanbul-reports/lib/lcov/index.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 909 bytes
Line 
1'use strict';
2/*
3 Copyright 2012-2015, Yahoo Inc.
4 Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
5 */
6const { ReportBase } = require('istanbul-lib-report');
7const LcovOnlyReport = require('../lcovonly');
8const HtmlReport = require('../html');
9
10class LcovReport extends ReportBase {
11 constructor(opts) {
12 super();
13 this.lcov = new LcovOnlyReport({ file: 'lcov.info', ...opts });
14 this.html = new HtmlReport({ subdir: 'lcov-report' });
15 }
16}
17
18['Start', 'End', 'Summary', 'SummaryEnd', 'Detail'].forEach(what => {
19 const meth = 'on' + what;
20 LcovReport.prototype[meth] = function(...args) {
21 const lcov = this.lcov;
22 const html = this.html;
23
24 if (lcov[meth]) {
25 lcov[meth](...args);
26 }
27 if (html[meth]) {
28 html[meth](...args);
29 }
30 };
31});
32
33module.exports = LcovReport;
Note: See TracBrowser for help on using the repository browser.