|
1 | 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
2 | 2 |
|
| 3 | +exports[`PLUGIN collect report with coverage-plugin NPM package > should run Code coverage plugin that runs coverage tool and creates report.json 1`] = ` |
| 4 | +{ |
| 5 | + "categories": [ |
| 6 | + { |
| 7 | + "refs": [ |
| 8 | + { |
| 9 | + "plugin": "coverage", |
| 10 | + "slug": "coverage", |
| 11 | + "type": "group", |
| 12 | + "weight": 1, |
| 13 | + }, |
| 14 | + ], |
| 15 | + "slug": "code-coverage", |
| 16 | + "title": "Code coverage", |
| 17 | + }, |
| 18 | + ], |
| 19 | + "packageName": "@code-pushup/core", |
| 20 | + "plugins": [ |
| 21 | + { |
| 22 | + "audits": [ |
| 23 | + { |
| 24 | + "description": "Measures how many functions were called in at least one test.", |
| 25 | + "details": { |
| 26 | + "issues": [ |
| 27 | + { |
| 28 | + "message": "Function formatReportScore is not called in any test case.", |
| 29 | + "severity": "error", |
| 30 | + "source": { |
| 31 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/partly-covered/utils.ts", |
| 32 | + "position": { |
| 33 | + "startLine": 2, |
| 34 | + }, |
| 35 | + }, |
| 36 | + }, |
| 37 | + { |
| 38 | + "message": "Function sortReport is not called in any test case.", |
| 39 | + "severity": "error", |
| 40 | + "source": { |
| 41 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/not-covered/sorting.ts", |
| 42 | + "position": { |
| 43 | + "startLine": 1, |
| 44 | + }, |
| 45 | + }, |
| 46 | + }, |
| 47 | + ], |
| 48 | + }, |
| 49 | + "displayValue": "60 %", |
| 50 | + "score": 0.6, |
| 51 | + "slug": "function-coverage", |
| 52 | + "title": "Function coverage", |
| 53 | + "value": 60, |
| 54 | + }, |
| 55 | + { |
| 56 | + "description": "Measures how many branches were executed after conditional statements in at least one test.", |
| 57 | + "details": { |
| 58 | + "issues": [ |
| 59 | + { |
| 60 | + "message": "2nd branch is not taken in any test case.", |
| 61 | + "severity": "error", |
| 62 | + "source": { |
| 63 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/partly-covered/utils.ts", |
| 64 | + "position": { |
| 65 | + "startLine": 6, |
| 66 | + }, |
| 67 | + }, |
| 68 | + }, |
| 69 | + { |
| 70 | + "message": "2nd branch is not taken in any test case.", |
| 71 | + "severity": "error", |
| 72 | + "source": { |
| 73 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/partly-covered/utils.ts", |
| 74 | + "position": { |
| 75 | + "startLine": 10, |
| 76 | + }, |
| 77 | + }, |
| 78 | + }, |
| 79 | + { |
| 80 | + "message": "1st branch is not taken in any test case.", |
| 81 | + "severity": "error", |
| 82 | + "source": { |
| 83 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/not-covered/sorting.ts", |
| 84 | + "position": { |
| 85 | + "startLine": 7, |
| 86 | + }, |
| 87 | + }, |
| 88 | + }, |
| 89 | + { |
| 90 | + "message": "2nd branch is not taken in any test case.", |
| 91 | + "severity": "error", |
| 92 | + "source": { |
| 93 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/not-covered/sorting.ts", |
| 94 | + "position": { |
| 95 | + "startLine": 7, |
| 96 | + }, |
| 97 | + }, |
| 98 | + }, |
| 99 | + ], |
| 100 | + }, |
| 101 | + "displayValue": "76.5 %", |
| 102 | + "score": 0.7647, |
| 103 | + "slug": "branch-coverage", |
| 104 | + "title": "Branch coverage", |
| 105 | + "value": 76.47058823529412, |
| 106 | + }, |
| 107 | + { |
| 108 | + "description": "Measures how many lines of code were executed in at least one test.", |
| 109 | + "details": { |
| 110 | + "issues": [ |
| 111 | + { |
| 112 | + "message": "Lines 7-9 are not covered in any test case.", |
| 113 | + "severity": "warning", |
| 114 | + "source": { |
| 115 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/partly-covered/utils.ts", |
| 116 | + "position": { |
| 117 | + "endLine": 9, |
| 118 | + "startLine": 7, |
| 119 | + }, |
| 120 | + }, |
| 121 | + }, |
| 122 | + { |
| 123 | + "message": "Lines 1-5 are not covered in any test case.", |
| 124 | + "severity": "warning", |
| 125 | + "source": { |
| 126 | + "file": "tmp/e2e/plugin-coverage-e2e/__test__/collect/existing-report/src/lib/not-covered/sorting.ts", |
| 127 | + "position": { |
| 128 | + "endLine": 5, |
| 129 | + "startLine": 1, |
| 130 | + }, |
| 131 | + }, |
| 132 | + }, |
| 133 | + ], |
| 134 | + }, |
| 135 | + "displayValue": "68 %", |
| 136 | + "score": 0.68, |
| 137 | + "slug": "line-coverage", |
| 138 | + "title": "Line coverage", |
| 139 | + "value": 68, |
| 140 | + }, |
| 141 | + ], |
| 142 | + "description": "Official Code PushUp code coverage plugin.", |
| 143 | + "docsUrl": "https://www.npmjs.com/package/@code-pushup/coverage-plugin/", |
| 144 | + "groups": [ |
| 145 | + { |
| 146 | + "description": "Group containing all defined coverage types as audits.", |
| 147 | + "refs": [ |
| 148 | + { |
| 149 | + "slug": "function-coverage", |
| 150 | + "weight": 6, |
| 151 | + }, |
| 152 | + { |
| 153 | + "slug": "branch-coverage", |
| 154 | + "weight": 3, |
| 155 | + }, |
| 156 | + { |
| 157 | + "slug": "line-coverage", |
| 158 | + "weight": 1, |
| 159 | + }, |
| 160 | + ], |
| 161 | + "slug": "coverage", |
| 162 | + "title": "Code coverage metrics", |
| 163 | + }, |
| 164 | + ], |
| 165 | + "icon": "folder-coverage-open", |
| 166 | + "packageName": "@code-pushup/coverage-plugin", |
| 167 | + "slug": "coverage", |
| 168 | + "title": "Code coverage", |
| 169 | + }, |
| 170 | + ], |
| 171 | +} |
| 172 | +`; |
| 173 | + |
3 | 174 | exports[`PLUGIN collect report with coverage-plugin NPM package > should run Code coverage plugin which collects passed results and creates report.json 1`] = ` |
4 | 175 | { |
5 | 176 | "categories": [ |
|
0 commit comments