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
| Parameter | Type | Description |
|---|---|---|
options.timeout | number | Auto-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
| Target | Supported |
|---|---|
term (TerminalReadable) | Yes |
term.screen | No |
term.cell(r, c) | No |
See Also
- toHaveCursor - composable cursor matcher (preferred)
- toHaveCursorHidden - assert cursor is hidden
- toHaveCursorAt - cursor position
- toHaveCursorStyle - cursor shape