mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
ci: render LoC signs Huge bold (#14855)
This commit is contained in:
@@ -41,9 +41,9 @@ function diffCell(count) {
|
||||
return '0'
|
||||
}
|
||||
if (count > 0) {
|
||||
return `$\\color{${COLOR_ADDED}}{+}$\u200b${count}`
|
||||
return `$\\color{${COLOR_ADDED}}{\\Huge{\\mathbf{+}}}$\u200b${count}`
|
||||
}
|
||||
return `$\\color{${COLOR_DELETED}}{−}$\u200b${Math.abs(count)}`
|
||||
return `$\\color{${COLOR_DELETED}}{\\Huge{\\mathbf{−}}}$\u200b${Math.abs(count)}`
|
||||
}
|
||||
|
||||
function locTableRow(label, bucket) {
|
||||
|
||||
@@ -108,10 +108,10 @@ describe('PR test LoC summary', () => {
|
||||
})
|
||||
|
||||
expect(block).toContain(
|
||||
'| Test | 1 | $\\color{#1a7f37}{+}$\u200b2 | $\\color{#cf222e}{−}$\u200b5 | $\\color{#cf222e}{−}$\u200b3 |'
|
||||
'| Test | 1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b2 | $\\color{#cf222e}{\\Huge{\\mathbf{−}}}$\u200b5 | $\\color{#cf222e}{\\Huge{\\mathbf{−}}}$\u200b3 |'
|
||||
)
|
||||
expect(block).toContain(
|
||||
'| Prod | 1 | 0 | $\\color{#cf222e}{−}$\u200b4 | $\\color{#cf222e}{−}$\u200b4 |'
|
||||
'| Prod | 1 | 0 | $\\color{#cf222e}{\\Huge{\\mathbf{−}}}$\u200b4 | $\\color{#cf222e}{\\Huge{\\mathbf{−}}}$\u200b4 |'
|
||||
)
|
||||
})
|
||||
|
||||
@@ -124,10 +124,10 @@ describe('PR test LoC summary', () => {
|
||||
|
||||
expect(block).toContain(LOC_HANDS_OFF_COMMENT)
|
||||
expect(block).toContain(
|
||||
'| Test | 1 | $\\color{#1a7f37}{+}$\u200b2 | $\\color{#cf222e}{−}$\u200b1 | $\\color{#1a7f37}{+}$\u200b1 |'
|
||||
'| Test | 1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b2 | $\\color{#cf222e}{\\Huge{\\mathbf{−}}}$\u200b1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b1 |'
|
||||
)
|
||||
expect(block).toContain(
|
||||
'| Prod | 1 | $\\color{#1a7f37}{+}$\u200b4 | 0 | $\\color{#1a7f37}{+}$\u200b4 |'
|
||||
'| Prod | 1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b4 | 0 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b4 |'
|
||||
)
|
||||
expect(block).not.toContain('| Total |')
|
||||
expect(mergeLocBlock('## ELI5\n\nHello\n', totals)).toBe(`${block}\n\n## ELI5\n\nHello\n`)
|
||||
@@ -160,10 +160,10 @@ describe('PR test LoC summary', () => {
|
||||
expect(result.stdout.startsWith('<!-- orca-pr-loc -->')).toBe(true)
|
||||
expect(result.stdout).toContain(LOC_HANDS_OFF_COMMENT)
|
||||
expect(result.stdout).toContain(
|
||||
'| Test | 1 | $\\color{#1a7f37}{+}$\u200b6 | $\\color{#cf222e}{−}$\u200b1 | $\\color{#1a7f37}{+}$\u200b5 |'
|
||||
'| Test | 1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b6 | $\\color{#cf222e}{\\Huge{\\mathbf{−}}}$\u200b1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b5 |'
|
||||
)
|
||||
expect(result.stdout).toContain(
|
||||
'| Prod | 1 | $\\color{#1a7f37}{+}$\u200b2 | 0 | $\\color{#1a7f37}{+}$\u200b2 |'
|
||||
'| Prod | 1 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b2 | 0 | $\\color{#1a7f37}{\\Huge{\\mathbf{+}}}$\u200b2 |'
|
||||
)
|
||||
expect(result.stdout).not.toContain('| Total |')
|
||||
expect(result.stdout).toContain('## ELI5\n\nHello\n')
|
||||
|
||||
Reference in New Issue
Block a user