Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/diagnostic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('built-in reporters', () => {
})
errs.NUXT_E033({ sources: ['a.ts:1:1', 'b.ts:2:2'] })
expect(
'[NUXT_E033] boom\n├▶ fix: restart it\n╰▶ sources: a.ts:1:1, b.ts:2:2',
'[NUXT_E033] boom\n├▶ fix: restart it\n╰▶ sources: a.ts:1:1, b.ts:2:2',
).toHaveBeenErrored()
})

Expand All @@ -239,7 +239,7 @@ describe('built-in reporters', () => {
docsBase: 'https://example.com/errors',
codes: { X: { why: 'boom' } },
})
expect(formatDiagnostic(errs.X())).toBe('[X] boom\n╰▶ see: https://example.com/errors/x')
expect(formatDiagnostic(errs.X())).toBe('[X] boom\n╰▶ see: https://example.com/errors/x')
})

it('reporterWithPriority includes the code and the priority value', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function formatDiagnostic(diagnostic: Diagnostic): string {
}

const lines = details.map((detail, i) => {
const connector = i < details.length - 1 ? '├▶' : '╰▶'
const connector = i < details.length - 1 ? '├▶\uFE0E' : '╰▶\uFE0E'
return `${connector} ${detail}`
})

Expand Down
8 changes: 4 additions & 4 deletions src/formatters/ansi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ describe('ansiFormatter', () => {
const d = diagnostics.E1({ sources: ['a.ts:1:1', 'b.ts:2:2'] })
expect(format(d)).toMatchInlineSnapshot(`
"<bold><red>[E1]</red></bold> broken
<dim>├▶</dim> <dim>fix:</dim> do x
<dim>├▶</dim> <dim>sources:</dim> a.ts:1:1, b.ts:2:2
<dim>╰▶</dim> <dim>see:</dim> <cyan>https://docs.test/e1</cyan>"
<dim>├▶</dim> <dim>fix:</dim> do x
<dim>├▶</dim> <dim>sources:</dim> a.ts:1:1, b.ts:2:2
<dim>╰▶</dim> <dim>see:</dim> <cyan>https://docs.test/e1</cyan>"
`)
})

Expand All @@ -44,7 +44,7 @@ describe('ansiFormatter', () => {
const d = diagnostics.E1()
expect(format(d)).toMatchInlineSnapshot(`
"<bold><red>[E1]</red></bold> broken
<dim>╰▶</dim> <dim>fix:</dim> do x"
<dim>╰▶</dim> <dim>fix:</dim> do x"
`)
})
})
2 changes: 1 addition & 1 deletion src/formatters/ansi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function ansiFormatter(colors: Colors): (d: Diagnostic) => string {
return header

const lines = details.map((detail, i) => {
const connector = colors.dim(i < details.length - 1 ? '├▶' : '╰▶')
const connector = colors.dim(i < details.length - 1 ? '├▶\uFE0E' : '╰▶\uFE0E')
return `${connector} ${detail}`
})
return [header, ...lines].join('\n')
Expand Down
Loading
Loading