Skip to content

toBeStrikethrough

Deprecated

Prefer toHaveAttrs which checks multiple attributes at once:

typescript
expect(term.cell(0, 0)).toHaveAttrs({ strikethrough: true })

Assert that a cell has strikethrough (crossed-out) styling.

Signature

typescript
expect(cell).toBeStrikethrough()

Usage

typescript
// Check a specific cell
expect(term.cell(0, 0)).toBeStrikethrough()

// Negation
expect(term.cell(0, 5)).not.toBeStrikethrough()

Accepts

RegionSupported
term.cell(r, c)Yes
term.screenNo
term.row(n)No

Notes

  • Strikethrough is SGR attribute 9
  • Not all terminal emulators render strikethrough visually

See Also