Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/cli-kit/src/private/node/testing/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ export async function sendInputAndWaitForContent(
...inputs: string[]
) {
await waitForContent(renderInstance, content, () => inputs.forEach((input) => renderInstance.stdin.write(input)))
// Yield so React 19's scheduler can flush effects (e.g. re-register useInput
// handlers with up-to-date closures) before subsequent input is sent.
await new Promise((resolve) => setImmediate(() => setTimeout(resolve, 0)))
}

/** Function that is useful when you want to check the last frame of a component that unmounted.
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading