mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 14:27:10 +01:00
feat(lcov) use really lcov.info file
This commit is contained in:
parent
61007344dd
commit
fb59f4f91d
11 changed files with 204 additions and 113 deletions
|
|
@ -1,45 +1,21 @@
|
|||

|
||||
## ❌ <a id="user-content-r0" href="#r0">fixtures/lcov.json</a>
|
||||
**15** tests were completed in **0ms** with **7** passed, **8** failed and **0** skipped.
|
||||

|
||||
## ❌ <a id="user-content-r0" href="#r0">fixtures/lcov.info</a>
|
||||
**6** tests were completed in **0ms** with **4** passed, **2** failed and **0** skipped.
|
||||
|Test suite|Passed|Failed|Skipped|Time|
|
||||
|:---|---:|---:|---:|---:|
|
||||
|[src/core/dao.service.ts](#r0s0)|3✅|||0ms|
|
||||
|[src/domains/auth/auth.controller.ts](#r0s1)|2✅|1❌||0ms|
|
||||
|[src/shared/notif/providers/fcm/fcm.service.spec.ts](#r0s2)||3❌||0ms|
|
||||
|[src/shared/notif/providers/fcm/fcm.service.ts](#r0s3)|1✅|2❌||0ms|
|
||||
|[src/shared/notif/providers/mail/mail-service.ts](#r0s4)|1✅|2❌||0ms|
|
||||
### ✅ <a id="user-content-r0s0" href="#r0s0">src/core/dao.service.ts</a>
|
||||
|[src/services/notifier/NotifierService.js](#r0s0)|2✅|1❌||0ms|
|
||||
|[src/services/notifier/providers/DiscordNotifierProvider.js](#r0s1)|2✅|1❌||0ms|
|
||||
### ❌ <a id="user-content-r0s0" href="#r0s0">src/services/notifier/NotifierService.js</a>
|
||||
```
|
||||
src/core/dao.service.ts
|
||||
✅ statement
|
||||
✅ fonction
|
||||
✅ branche
|
||||
src/services/notifier/NotifierService.js
|
||||
✅ lines 100% (21/21)
|
||||
✅ functions 100% (10/10)
|
||||
❌ branches 50% (3/6)
|
||||
```
|
||||
### ❌ <a id="user-content-r0s1" href="#r0s1">src/domains/auth/auth.controller.ts</a>
|
||||
### ❌ <a id="user-content-r0s1" href="#r0s1">src/services/notifier/providers/DiscordNotifierProvider.js</a>
|
||||
```
|
||||
src/domains/auth/auth.controller.ts
|
||||
✅ statement
|
||||
❌ fonction
|
||||
✅ branche
|
||||
```
|
||||
### ❌ <a id="user-content-r0s2" href="#r0s2">src/shared/notif/providers/fcm/fcm.service.spec.ts</a>
|
||||
```
|
||||
src/shared/notif/providers/fcm/fcm.service.spec.ts
|
||||
❌ statement
|
||||
❌ fonction
|
||||
❌ branche
|
||||
```
|
||||
### ❌ <a id="user-content-r0s3" href="#r0s3">src/shared/notif/providers/fcm/fcm.service.ts</a>
|
||||
```
|
||||
src/shared/notif/providers/fcm/fcm.service.ts
|
||||
❌ statement
|
||||
❌ fonction
|
||||
✅ branche
|
||||
```
|
||||
### ❌ <a id="user-content-r0s4" href="#r0s4">src/shared/notif/providers/mail/mail-service.ts</a>
|
||||
```
|
||||
src/shared/notif/providers/mail/mail-service.ts
|
||||
❌ statement
|
||||
❌ fonction
|
||||
✅ branche
|
||||
src/services/notifier/providers/DiscordNotifierProvider.js
|
||||
✅ lines 100% (17/17)
|
||||
✅ functions 100% (3/3)
|
||||
❌ branches 75% (3/4)
|
||||
```
|
||||
92
__tests__/fixtures/lcov.info
Normal file
92
__tests__/fixtures/lcov.info
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
TN:
|
||||
SF:src/services/notifier/NotifierService.js
|
||||
FN:9,(anonymous_0)
|
||||
FN:10,(anonymous_1)
|
||||
FN:26,(anonymous_2)
|
||||
FN:27,(anonymous_3)
|
||||
FN:29,(anonymous_4)
|
||||
FN:30,(anonymous_5)
|
||||
FN:46,(anonymous_6)
|
||||
FN:47,(anonymous_7)
|
||||
FN:48,(anonymous_8)
|
||||
FN:49,(anonymous_9)
|
||||
FNF:10
|
||||
FNH:10
|
||||
FNDA:1,(anonymous_0)
|
||||
FNDA:1,(anonymous_1)
|
||||
FNDA:1,(anonymous_2)
|
||||
FNDA:3,(anonymous_3)
|
||||
FNDA:3,(anonymous_4)
|
||||
FNDA:3,(anonymous_5)
|
||||
FNDA:1,(anonymous_6)
|
||||
FNDA:3,(anonymous_7)
|
||||
FNDA:3,(anonymous_8)
|
||||
FNDA:3,(anonymous_9)
|
||||
DA:9,1
|
||||
DA:10,1
|
||||
DA:11,1
|
||||
DA:13,1
|
||||
DA:14,1
|
||||
DA:26,1
|
||||
DA:27,3
|
||||
DA:29,1
|
||||
DA:30,3
|
||||
DA:31,3
|
||||
DA:33,3
|
||||
DA:34,3
|
||||
DA:46,1
|
||||
DA:47,3
|
||||
DA:48,3
|
||||
DA:51,3
|
||||
DA:53,3
|
||||
DA:54,3
|
||||
DA:58,3
|
||||
DA:61,1
|
||||
DA:64,1
|
||||
LF:21
|
||||
LH:21
|
||||
BRDA:11,0,0,1
|
||||
BRDA:11,0,1,0
|
||||
BRDA:31,1,0,3
|
||||
BRDA:31,1,1,0
|
||||
BRDA:51,2,0,3
|
||||
BRDA:51,2,1,0
|
||||
BRF:6
|
||||
BRH:3
|
||||
end_of_record
|
||||
TN:
|
||||
SF:src/services/notifier/providers/DiscordNotifierProvider.js
|
||||
FN:12,(anonymous_0)
|
||||
FN:33,(anonymous_1)
|
||||
FN:51,(anonymous_2)
|
||||
FNF:3
|
||||
FNH:3
|
||||
FNDA:1,(anonymous_0)
|
||||
FNDA:1,(anonymous_1)
|
||||
FNDA:1,(anonymous_2)
|
||||
DA:3,1
|
||||
DA:12,1
|
||||
DA:13,1
|
||||
DA:14,1
|
||||
DA:22,1
|
||||
DA:23,1
|
||||
DA:33,1
|
||||
DA:34,1
|
||||
DA:35,1
|
||||
DA:40,1
|
||||
DA:41,1
|
||||
DA:51,1
|
||||
DA:52,1
|
||||
DA:53,1
|
||||
DA:58,1
|
||||
DA:59,1
|
||||
DA:62,1
|
||||
LF:17
|
||||
LH:17
|
||||
BRDA:18,0,0,0
|
||||
BRDA:18,0,1,1
|
||||
BRDA:20,1,0,1
|
||||
BRDA:20,1,1,1
|
||||
BRF:4
|
||||
BRH:3
|
||||
end_of_record
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -3,12 +3,12 @@ import * as path from 'path'
|
|||
|
||||
import {getReport} from '../src/report/get-report'
|
||||
import {normalizeFilePath} from '../src/utils/path-utils'
|
||||
import { LcovParser } from "../src/parsers/lcov-json/lcov-parser";
|
||||
import { LcovParser } from "../src/parsers/lcov/lcov-parser";
|
||||
|
||||
describe('lcov report coverage', () => {
|
||||
|
||||
it('report from facebook/jest test results matches snapshot', async () => {
|
||||
const fixturePath = path.join(__dirname, 'fixtures', 'lcov.json')
|
||||
const fixturePath = path.join(__dirname, 'fixtures', 'lcov.info')
|
||||
const outputPath = path.join(__dirname, '__outputs__', 'lcov-report-results.md')
|
||||
const filePath = normalizeFilePath(path.relative(__dirname, fixturePath))
|
||||
const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue