Skip to content

toBeDim

Deprecated

Prefer toHaveAttrs which checks multiple attributes at once:

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

Assert that a cell has dim (faint) styling. Also known as toBeFaint in some terminal documentation.

Signature

typescript
expect(cell).toBeDim()

Usage

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

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

Accepts

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

Notes

  • Dim text is rendered at reduced intensity (SGR attribute 2)
  • Some terminals render dim as a lighter shade of the foreground color

See Also