Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@connectis/coverage-parser
Advanced tools
Readme
A Node.js library for parsing coverage reports.
This library bundles different coverage parsers that parse coverage information in a uniform way. Supported coverage report formats:
Note: if you want to merge the parsed results you can use @connectis/coverage-merger.
const coverageParser = require('@connectis/coverage-parser');
coverageParser
.parseGlobs('**/lcov.info', {
type: 'lcov'
})
.then(results => console.log(results));
The API includes the following:
Type Array<string>
Array of available parser types.
Type object
Type: string
The type of parser which should be used for parsing the coverage files. See the exported types
array for available types.
Type: function
Custom parser function for parsing the coverage files: (file) => Promise<Array<CoverageResult>>
. See below.
Type: 'absolute' | 'relative' | 'unmodified'
Default: 'absolute'
The type of paths that should be used in the parsed result. See options.baseDir
.
Type: string
Default: process.cwd()
The base directory that will be used for making paths relative or absolute in the coverage reports. See options.pathMode
.
Finds all coverage reports matching the glob patterns and parses the results.
Type: Array<string>|string
Either an of glob patterns or a single glob pattern.
Type: options
. See above.
Type: object
Options to pass to fast-glob.
Type: Promise<Array<CoverageResult>>
. See below.
Parses all coverage reports files.
Type: Array<string>
An array of file paths.
Type: options
. See above.
Type: Promise<Array<CoverageResult>>
. See below.
Parses the coverage reports file.
Type: string
The file path.
Type: options
. See above.
Type: Promise<Array<CoverageResult>>
. See below.
The returned data has the following format.
{
"title": "Test #1",
"file": "/some/absolute/path/anim-base/anim-base-coverage.js",
"functions": {
"hit": 23,
"found": 29,
"details": [
{
"name": "(anonymous 1)",
"line": 7,
"hit": 6
},
{
"name": "(anonymous 2)",
"line": 620,
"hit": 225
},
{
"name": "_end",
"line": 516,
"hit": 228
}
]
},
"lines": {
"found": 181,
"hit": 143,
"details": [
{
"line": 7,
"hit": 6
},
{
"line": 29,
"hit": 6
},
{
"line": 41,
"hit": 0
}
]
},
"branches": {
"found": 2,
"hit": 1,
"details": [
{
"line": 9,
"branch": 0,
"taken": 0
},
{
"line": 9,
"branch": 1,
"taken": 1
}
]
}
}
FAQs
Library for parsing coverage reports.
The npm package @connectis/coverage-parser receives a total of 5,811 weekly downloads. As such, @connectis/coverage-parser popularity was classified as popular.
We found that @connectis/coverage-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.