headlamp 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +5075 -4596
- package/dist/cli.cjs.map +4 -4
- package/dist/index.js +5025 -4541
- package/dist/index.js.map +4 -4
- package/dist/jest/reporter.cjs +26 -6
- package/package.json +9 -1
package/dist/jest/reporter.cjs
CHANGED
|
@@ -108,7 +108,13 @@ class BridgeReporter {
|
|
|
108
108
|
});
|
|
109
109
|
this.buf.testResults.push({
|
|
110
110
|
testFilePath: tr.testFilePath,
|
|
111
|
-
|
|
111
|
+
// Consider suite-level errors as failures even when no individual assertions failed
|
|
112
|
+
status:
|
|
113
|
+
(tr && typeof tr.numFailingTests === 'number' && tr.numFailingTests > 0) ||
|
|
114
|
+
Boolean(tr.testExecError) ||
|
|
115
|
+
Boolean(tr.failureMessage)
|
|
116
|
+
? 'failed'
|
|
117
|
+
: 'passed',
|
|
112
118
|
timedOut: Boolean(
|
|
113
119
|
(tr.testExecError &&
|
|
114
120
|
/timed out/i.test(
|
|
@@ -147,19 +153,33 @@ class BridgeReporter {
|
|
|
147
153
|
const testTimeouts = this.buf.testResults
|
|
148
154
|
.flatMap((r) => r.testResults || [])
|
|
149
155
|
.filter((a) => a && a.timedOut);
|
|
156
|
+
// Recompute suite pass/fail counts to include suite-level errors/timeouts
|
|
157
|
+
const totalSuites = typeof agg.numTotalTestSuites === 'number' ? agg.numTotalTestSuites : 0;
|
|
158
|
+
const failedSuites = this.buf.testResults.filter(
|
|
159
|
+
(r) => r.status === 'failed' || r.testExecError || r.failureMessage,
|
|
160
|
+
).length;
|
|
161
|
+
const passedSuites = Math.max(0, totalSuites - failedSuites);
|
|
162
|
+
const failedAssertions = typeof agg.numFailedTests === 'number' ? agg.numFailedTests : 0;
|
|
163
|
+
const suiteOnlyFailures = Math.max(0, failedSuites - failedAssertions);
|
|
164
|
+
const failedTestsInclSuiteErrors = failedAssertions + suiteOnlyFailures;
|
|
165
|
+
|
|
150
166
|
this.buf.aggregated = {
|
|
151
|
-
numTotalTestSuites:
|
|
152
|
-
numPassedTestSuites:
|
|
153
|
-
numFailedTestSuites:
|
|
167
|
+
numTotalTestSuites: totalSuites,
|
|
168
|
+
numPassedTestSuites: passedSuites,
|
|
169
|
+
numFailedTestSuites: failedSuites,
|
|
154
170
|
numTotalTests: agg.numTotalTests,
|
|
155
171
|
numPassedTests: agg.numPassedTests,
|
|
156
|
-
numFailedTests:
|
|
172
|
+
numFailedTests: failedTestsInclSuiteErrors,
|
|
157
173
|
numPendingTests: agg.numPendingTests,
|
|
158
174
|
numTodoTests: agg.numTodoTests,
|
|
159
175
|
numTimedOutTests: testTimeouts.length,
|
|
160
176
|
numTimedOutTestSuites: fileTimeouts.length,
|
|
161
177
|
startTime: agg.startTime,
|
|
162
|
-
success:
|
|
178
|
+
success:
|
|
179
|
+
Boolean(agg.success) &&
|
|
180
|
+
failedSuites === 0 &&
|
|
181
|
+
failedTestsInclSuiteErrors === 0 &&
|
|
182
|
+
fileTimeouts.length === 0,
|
|
163
183
|
runTimeMs: agg.testResults.reduce(
|
|
164
184
|
(t, r) => t + Math.max(0, (r.perfStats?.end || 0) - (r.perfStats?.start || 0)),
|
|
165
185
|
0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "headlamp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.32",
|
|
4
4
|
"description": "Coverage-first, runner-agnostic test UX CLI for Jest",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,6 +35,14 @@
|
|
|
35
35
|
],
|
|
36
36
|
"author": "",
|
|
37
37
|
"license": "MIT",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "git+https://github.com/dbpiper/headlamp.git"
|
|
41
|
+
},
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/dbpiper/headlamp/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/dbpiper/headlamp#readme",
|
|
38
46
|
"dependencies": {
|
|
39
47
|
"c12": "^3.2.0",
|
|
40
48
|
"es-toolkit": "^1.7.2",
|