example/main.js
async function parseReport() { // eslint-disable-line no-unused-vars
  try {
    const coverage = await promises.readFile('lcov.info', 'utf8');
    const report = Report.fromCoverage(coverage);
    console.log(`The coverage report contains ${report.records.length} records:`);
    console.log(report.toJSON());
  }

  catch (error) {
    console.log(`An error occurred: ${error.message}`);
  }
}
async function parseReport() { // eslint-disable-line no-unused-vars
  try {
    const coverage = await promises.readFile('lcov.info', 'utf8');
    const report = Report.fromCoverage(coverage);
    console.log(`The coverage report contains ${report.records.length} records:`);
    console.log(report.toJSON());
  }

  catch (error) {
    console.log(`An error occurred: ${error.message}`);
  }
}
async function parseReport ( ) { // eslint-disable-line no-unused-vars try { const coverage = await promises . readFile ( 'lcov.info' , 'utf8' ) ; const report = Report . fromCoverage ( coverage ) ; console . log ( ` ${ report . records . length } ` ) ; console . log ( report . toJSON ( ) ) ; } catch ( error ) { console . log ( ` ${ error . message } ` ) ; } }
Parses a LCOV report to coverage data.
Parses a LCOV report to coverage data .