Skip to content

Commit af33d2a

Browse files
committed
Add a test
1 parent 2268f68 commit af33d2a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,10 @@ test.serial('Can use .beautiful()', (t) => {
6363
const { consoleArg } = handleError(error)
6464
t.true(consoleArg.includes(`${figures.cross} CUSTOMERROR: TEST`))
6565
})
66+
67+
test.serial('Can use .beautiful() deeply', (t) => {
68+
const error = new Error('test', { cause: new CustomError('inner') })
69+
const { consoleArg } = handleError(error)
70+
t.true(consoleArg.includes(`${figures.cross} Error: test`))
71+
t.true(consoleArg.includes(`\n ${figures.cross} CUSTOMERROR: INNER`))
72+
})

0 commit comments

Comments
 (0)