0.4.40 • Published 3 years ago
@technote-space/clover-json v0.4.40
clover-json
Parse clover report files, and return a JSON representation in a lcov-parse compatible manner.
Table of Contents
Usage
- Install
- npm
npm i @technote-space/clover-json
- yarn
yarn add @technote-space/clover-json
- npm
- Use
import { parseFile, parseContent } from "@technote-space/clover-json";
async function run(): Promise<void> {
// Parse by file path
const json1 = await parseFile('filepath.xml');
// Parse by file contents
const json2 = await parseContent('<?xml version="1.0" ?><coverage>...</coverage>');
}
run();
Sample Data
[
{
"file": "coveralls/lib/client.js",
"functions": {
"details": [
{
"hit": 2,
"line": 5,
"name": "upload"
}
],
"found": 1,
"hit": 1
},
"lines": {
"details": [
{
"hit": 2,
"line": 6
},
{
"hit": 2,
"line": 7
},
{
"hit": 2,
"line": 8
},
{
"hit": 2,
"line": 9
}
],
"found": 4,
"hit": 4
},
"title": "Client"
},
{
"file": "coveralls/lib/configuration.js",
"functions": {
"details": [
{
"hit": 4,
"line": 6,
"name": "fromEnvironment"
}
],
"found": 1,
"hit": 1
},
"lines": {
"details": [
{
"hit": 4,
"line": 7
},
{
"hit": 4,
"line": 8
},
{
"hit": 2,
"line": 9
},
{
"hit": 2,
"line": 10
},
{
"hit": 4,
"line": 11
},
{
"hit": 2,
"line": 12
},
{
"hit": 2,
"line": 13
},
{
"hit": 4,
"line": 14
},
{
"hit": 4,
"line": 15
}
],
"found": 9,
"hit": 9
},
"title": "Configuration"
},
{
"file": "coveralls/lib/git_commit.js",
"functions": {
"details": [
{
"hit": 2,
"line": 6,
"name": "toJSON"
}
],
"found": 1,
"hit": 1
},
"lines": {
"details": [
{
"hit": 2,
"line": 7
},
{
"hit": 2,
"line": 8
},
{
"hit": 2,
"line": 9
},
{
"hit": 2,
"line": 10
},
{
"hit": 2,
"line": 11
},
{
"hit": 0,
"line": 12
},
{
"hit": 0,
"line": 13
},
{
"hit": 2,
"line": 14
},
{
"hit": 2,
"line": 15
}
],
"found": 9,
"hit": 7
},
"title": "GitCommit"
}
]
0.4.40
3 years ago
0.4.39
3 years ago
0.4.38
3 years ago
0.4.37
3 years ago
0.4.36
3 years ago
0.4.35
3 years ago
0.4.34
4 years ago
0.4.33
4 years ago
0.4.32
4 years ago
0.4.31
4 years ago
0.4.30
4 years ago
0.4.29
4 years ago
0.4.28
4 years ago
0.4.27
4 years ago
0.4.26
4 years ago
0.4.25
4 years ago
0.4.24
4 years ago
0.4.23
4 years ago
0.4.22
4 years ago
0.4.21
4 years ago
0.4.20
4 years ago
0.4.19
4 years ago
0.4.18
4 years ago
0.4.17
4 years ago
0.4.16
4 years ago
0.4.15
4 years ago
0.4.14
4 years ago
0.4.13
4 years ago
0.4.12
4 years ago
0.4.11
4 years ago
0.4.10
4 years ago
0.4.9
4 years ago
0.4.8
4 years ago
0.4.6
5 years ago
0.4.3
5 years ago
0.4.2
5 years ago
0.4.1
5 years ago