We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ec35021 commit b5cefadCopy full SHA for b5cefad
1 file changed
src/options/classes.test.js
@@ -39,3 +39,15 @@ each(
39
})
40
},
41
)
42
+
43
+test.serial('Apply option "classes" to nested errors', (t) => {
44
+ const typeError = new TypeError('test', { cause: new URIError('test') })
45
+ const { consoleArg } = handleError(typeError, {
46
+ classes: {
47
+ TypeError: { icon: 'warning' },
48
+ URIError: { icon: 'info' },
49
+ },
50
+ })
51
+ t.true(consoleArg.includes(`${figures.warning} TypeError: test`))
52
+ t.true(consoleArg.includes(`${figures.info} URIError: test`))
53
+})
0 commit comments