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.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions