Skip to content

Commit

Permalink
test: make ansi output assertion more resillient
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 21, 2024
1 parent 437cb2d commit 90d99a4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/dumper/dumper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,20 @@ test.group('Dumper', () => {
dumper.dd({ hello: 'world' })
} catch (error) {
await error.render(error, ace)

assert.lengthOf(ace.ui.logger.getLogs(), 1)
assert.include(
ace.ui.logger.getLogs()[0].message,
"\x1B[33m{\x1B[39m\n \x1B[34mhello\x1B[39m: \x1B[32m'world'\x1B[39m,\n\x1B[33m}\x1B[39m"
dumper.dumpToAnsi(
{ hello: 'world' },
{
title: 'DUMP DIE',
source: {
location: import.meta.filename,
line: 68,
},
}
)
)
}
})
Expand Down

0 comments on commit 90d99a4

Please sign in to comment.