Skip to content

Commit 76b2f0d

Browse files
committed
chore(tests): drop self-referential and restating comments in display tests
1 parent e1525c5 commit 76b2f0d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

packages/cli/test/unit/utils/error/display.test.mts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ describe('error/display', () => {
151151
})
152152

153153
it('preserves Error.cause chain in message without debug mode', () => {
154-
// Regression: formatErrorForDisplay used to only surface causes
155-
// under showStack/verbose, so non-debug users lost the most useful
156-
// diagnostic context. See PR #1238.
157154
const inner = new Error('root DNS failure')
158155
const middle = new Error('network call failed', { cause: inner })
159156
const outer = new Error('API request failed', { cause: middle })
@@ -166,19 +163,15 @@ describe('error/display', () => {
166163
})
167164

168165
it('stops walking causes at depth 5 to avoid runaway chains', () => {
169-
// Build inside-out so the outer Error sits at index 10 and chains
170-
// down through level-9, level-8, ..., level-0.
171166
let e: Error | undefined
172167
for (let i = 0; i <= 10; i++) {
173168
e = new Error(`level-${i}`, e ? { cause: e } : undefined)
174169
}
175170

176171
const result = formatErrorForDisplay(e!)
177172

178-
// Top message + 5 causes should appear.
179173
expect(result.message).toContain('level-10')
180174
expect(result.message).toContain('level-5')
181-
// Anything beyond depth 5 should have been truncated.
182175
expect(result.message).not.toContain('level-4')
183176
})
184177

0 commit comments

Comments
 (0)