mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 10:01:29 -07:00
Disallow redundant typecasts. (#15030)
This commit is contained in:
committed by
GitHub
parent
fcc3b2b5ec
commit
942bcfc61e
@@ -231,7 +231,7 @@ describe('commandUtils', () => {
|
||||
const expected = `${ESC}]52;c;${b64}${BEL}`;
|
||||
|
||||
expect(tty.write).toHaveBeenCalledTimes(1);
|
||||
expect((tty.write as Mock).mock.calls[0][0]).toBe(expected);
|
||||
expect(tty.write.mock.calls[0][0]).toBe(expected);
|
||||
expect(tty.end).toHaveBeenCalledTimes(1); // /dev/tty closed after write
|
||||
expect(mockClipboardyWrite).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -245,7 +245,7 @@ describe('commandUtils', () => {
|
||||
|
||||
await copyToClipboard(testText);
|
||||
|
||||
const written = (tty.write as Mock).mock.calls[0][0] as string;
|
||||
const written = tty.write.mock.calls[0][0] as string;
|
||||
// Starts with tmux DCS wrapper and ends with ST
|
||||
expect(written.startsWith(`${ESC}Ptmux;`)).toBe(true);
|
||||
expect(written.endsWith(ST)).toBe(true);
|
||||
@@ -264,7 +264,7 @@ describe('commandUtils', () => {
|
||||
|
||||
await copyToClipboard(testText);
|
||||
|
||||
const written = (tty.write as Mock).mock.calls[0][0] as string;
|
||||
const written = tty.write.mock.calls[0][0] as string;
|
||||
const chunkStarts = (written.match(new RegExp(`${ESC}P`, 'g')) || [])
|
||||
.length;
|
||||
const chunkEnds = written.split(ST).length - 1;
|
||||
|
||||
Reference in New Issue
Block a user