Migrate core render util to use xterm.js as part of the rendering loop. (#19044)

This commit is contained in:
Jacob Richman
2026-02-18 16:46:50 -08:00
committed by GitHub
parent 04c52513e7
commit 04f65f3d55
213 changed files with 7065 additions and 3852 deletions

View File

@@ -13,14 +13,14 @@ import { vi } from 'vitest';
// The version of waitFor from vitest is still fine to use if you aren't waiting
// for React state updates.
export async function waitFor(
assertion: () => void,
assertion: () => void | Promise<void>,
{ timeout = 2000, interval = 50 } = {},
): Promise<void> {
const startTime = Date.now();
while (true) {
try {
assertion();
await assertion();
return;
} catch (error) {
if (Date.now() - startTime > timeout) {