fix(ui): Fix and unskip InputPrompt tests (#11700)

This commit is contained in:
Sandy Tao
2025-10-22 14:59:10 -07:00
committed by GitHub
parent 4f220e945a
commit 2ede47d5ee

View File

@@ -1581,8 +1581,9 @@ describe('InputPrompt', () => {
await vi.runAllTimersAsync(); await vi.runAllTimersAsync();
// Simulate a paste operation (this should set the paste protection) // Simulate a paste operation (this should set the paste protection)
stdin.write(`\x1b[200~pasted content\x1b[201~`); act(() => {
await vi.runAllTimersAsync(); stdin.write(`\x1b[200~pasted content\x1b[201~`);
});
// Simulate an Enter key press immediately after paste // Simulate an Enter key press immediately after paste
stdin.write('\r'); stdin.write('\r');
@@ -2073,7 +2074,7 @@ describe('InputPrompt', () => {
unmount(); unmount();
}); });
it.skip('expands and collapses long suggestion via Right/Left arrows', async () => { it('expands and collapses long suggestion via Right/Left arrows', async () => {
props.shellModeActive = false; props.shellModeActive = false;
const longValue = 'l'.repeat(200); const longValue = 'l'.repeat(200);