summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx
diff options
context:
space:
mode:
authorMiguel Solorio <[email protected]>2025-07-23 15:39:22 -0700
committerGitHub <[email protected]>2025-07-23 22:39:22 +0000
commit2e28bb90a00ad415d453a2ec868faa78679602f0 (patch)
treee94a960be7d61a0982ba4e997442a6afeda63082 /packages/cli/src/ui/components/messages/DiffRenderer.test.tsx
parente21b5c95aaf801da2539ebbc53f0fd3cf45b7ed2 (diff)
Update diff colors (#4747)
Co-authored-by: Jacob Richman <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/components/messages/DiffRenderer.test.tsx')
-rw-r--r--packages/cli/src/ui/components/messages/DiffRenderer.test.tsx46
1 files changed, 23 insertions, 23 deletions
diff --git a/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx b/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx
index e299f2af..9629b94b 100644
--- a/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx
+++ b/packages/cli/src/ui/components/messages/DiffRenderer.test.tsx
@@ -130,8 +130,8 @@ index 0000001..0000002 100644
);
const output = lastFrame();
const lines = output!.split('\n');
- expect(lines[0]).toBe('1 - old line');
- expect(lines[1]).toBe('1 + new line');
+ expect(lines[0]).toBe('1 - old line');
+ expect(lines[1]).toBe('1 + new line');
});
it('should handle diff with only header and no changes', () => {
@@ -253,35 +253,35 @@ index 123..789 100644
{
terminalWidth: 80,
height: undefined,
- expected: `1 console.log('first hunk');
-2 - const oldVar = 1;
-2 + const newVar = 1;
-3 console.log('end of first hunk');
+ expected: ` 1 console.log('first hunk');
+ 2 - const oldVar = 1;
+ 2 + const newVar = 1;
+ 3 console.log('end of first hunk');
════════════════════════════════════════════════════════════════════════════════
-20 console.log('second hunk');
-21 - const anotherOld = 'test';
-21 + const anotherNew = 'test';
-22 console.log('end of second hunk');`,
+20 console.log('second hunk');
+21 - const anotherOld = 'test';
+21 + const anotherNew = 'test';
+22 console.log('end of second hunk');`,
},
{
terminalWidth: 80,
height: 6,
expected: `... first 4 lines hidden ...
════════════════════════════════════════════════════════════════════════════════
-20 console.log('second hunk');
-21 - const anotherOld = 'test';
-21 + const anotherNew = 'test';
-22 console.log('end of second hunk');`,
+20 console.log('second hunk');
+21 - const anotherOld = 'test';
+21 + const anotherNew = 'test';
+22 console.log('end of second hunk');`,
},
{
terminalWidth: 30,
height: 6,
expected: `... first 10 lines hidden ...
- 'test';
-21 + const anotherNew =
- 'test';
-22 console.log('end of
- second hunk');`,
+ ;
+21 + const anotherNew = 'test'
+ ;
+22 console.log('end of
+ second hunk');`,
},
])(
'with terminalWidth $terminalWidth and height $height',
@@ -329,11 +329,11 @@ fileDiff Index: file.txt
);
const output = lastFrame();
- expect(output).toEqual(`1 - const oldVar = 1;
-1 + const newVar = 1;
+ expect(output).toEqual(` 1 - const oldVar = 1;
+ 1 + const newVar = 1;
════════════════════════════════════════════════════════════════════════════════
-20 - const anotherOld = 'test';
-20 + const anotherNew = 'test';`);
+20 - const anotherOld = 'test';
+20 + const anotherNew = 'test';`);
});
it('should correctly render a new file with no file extension correctly', () => {