We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990eaee commit e96237cCopy full SHA for e96237c
src/main.test.ts
@@ -60,3 +60,11 @@ test('Can use aggregate errors', (t) => {
60
t.true(message.includes(`${figures.warning} ExitCodeError: test`))
61
t.true(message.includes(`${figures.info} DatabaseError: inner`))
62
})
63
+
64
+test('Can pass "cause"', (t) => {
65
+ const inner = new DatabaseError('inner')
66
+ const outer = new ExitCodeError('test', { errors: [inner] })
67
+ const message = BaseError.beautiful(outer, { cause: false })
68
+ t.true(message.includes(`${figures.warning} ExitCodeError: test`))
69
+ t.false(message.includes('DatabaseError'))
70
+})
0 commit comments