diff --git a/modules/dumper/dumper.ts b/modules/dumper/dumper.ts index 318aab48..b486c5ce 100644 --- a/modules/dumper/dumper.ts +++ b/modules/dumper/dumper.ts @@ -212,8 +212,8 @@ export class Dumper { * Whitespace between the title and the link to align them * on each side of x axis */ - const whiteSpaceLength = columns ? columns - link.length - title.length - 4 : 1 - const whiteSpace = new Array(whiteSpaceLength <= 0 ? 1 : whiteSpaceLength).join(' ') + const whiteSpaceLength = columns ? columns - link.length - title.length - 4 : 2 + const whiteSpace = new Array(whiteSpaceLength <= 0 ? 2 : whiteSpaceLength).join(' ') /** * Styled heading with background color and bold text diff --git a/tests/dumper/dumper.spec.ts b/tests/dumper/dumper.spec.ts index d2f72562..5a1eb2ba 100644 --- a/tests/dumper/dumper.spec.ts +++ b/tests/dumper/dumper.spec.ts @@ -71,33 +71,21 @@ test.group('Dumper', () => { } catch (error) { await error.render(error, ace) - console.log(ace.ui.logger.getLogs()[0].message) - console.log( - dumper.dumpToAnsi( - { hello: 'world' }, - { - title: 'DUMP DIE', - source: { - location: fileURLToPath(new URL('', import.meta.url)), - line: 70, - }, - } - ) - ) - assert.lengthOf(ace.ui.logger.getLogs(), 1) assert.include( - ace.ui.logger.getLogs()[0].message, - dumper.dumpToAnsi( - { hello: 'world' }, - { - title: 'DUMP DIE', - source: { - location: fileURLToPath(new URL('', import.meta.url)), - line: 70, - }, - } - ) + ace.ui.logger.getLogs()[0].message.toLowerCase(), + dumper + .dumpToAnsi( + { hello: 'world' }, + { + title: 'DUMP DIE', + source: { + location: fileURLToPath(new URL('', import.meta.url)), + line: 70, + }, + } + ) + .toLowerCase() ) } })