Skip to content

Commit d48891a

Browse files
committed
fix: handle duplicate log messages without barfing
1 parent 8a7394d commit d48891a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Reporter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ const TestConsoleOutput = ({
3636
const TITLE_INDENT = verbose ? '\xa0'.repeat(2) : '\xa0'.repeat(4);
3737
const CONSOLE_INDENT = TITLE_INDENT + '\xa0'.repeat(2);
3838

39-
const content = console.map(({ type, message, origin }) => {
39+
const content = console.map(({ type, message, origin }, index) => {
4040
origin = slash(path.relative(cwd, origin));
4141
message = message
4242
.split(/\n/)
4343
.map(line => CONSOLE_INDENT + line)
4444
.join('\n');
4545

4646
return (
47-
<Box key={message} flexDirection="column" paddingBottom={1}>
47+
<Box key={index} flexDirection="column" paddingBottom={1}>
4848
<Box>
4949
{TITLE_INDENT}{' '}
5050
<ColoredConsole type={type} dim>

0 commit comments

Comments
 (0)