Skip to content

toHaveCursorVisible

Deprecated

Prefer toHaveCursor which checks multiple cursor properties at once:

typescript
expect(term).toHaveCursor({ visible: true })

Assert that the terminal cursor is visible.

Signature

typescript
expect(term).toHaveCursorVisible(options?: { timeout?: number })

Parameters

ParameterTypeDescription
options.timeoutnumberAuto-retry timeout in ms (Playwright-style)

Usage

typescript
// Assert cursor is visible
expect(term).toHaveCursorVisible()

// With auto-retry
await expect(term).toHaveCursorVisible({ timeout: 5000 })

// Negation
expect(term).not.toHaveCursorVisible()

Accepts

TargetSupported
term (TerminalReadable)Yes
term.screenNo
term.cell(r, c)No

See Also