Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Unit tests for lib/output.js (table, csv, sparkline) #4

Description

@Ashutosh0x

lib/output.js (table renderer, CSV escaping, sparkline, ANSI-aware padding) has no test coverage. It is pure functions — ideal first contribution.

Task
Add node:test-based tests (no new dependencies) covering:

  • table() column widths with ANSI-colored cells (visibleLength handling).
  • csv() quoting of commas, quotes, and newlines; ANSI stripped.
  • sparkline() min/max normalization and single-value input.
  • pad() left/right alignment.

Wire up npm test in package.json.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions