Skip to content

test: add test coverage for rafter brief command #28

Description

@Rome-1

What

The `rafter brief` command has no automated tests in either implementation. Add comprehensive test coverage.

Context

`rafter brief` delivers platform-specific security knowledge to AI agents. It supports 8 platforms and multiple topics. See the existing `report.test.ts` (219 lines, 16 test cases) as a reference for test style.

What to test

  • All topic listing and help output
  • Each platform-specific guide renders correctly
  • Agent mode output (plain text, no colors/emoji)
  • Invalid topic handling (graceful error)
  • Help flag output

Files to create

  1. `node/tests/brief.test.ts` — Vitest tests (reference: `node/tests/report.test.ts`)
  2. `python/tests/test_brief.py` — pytest tests

Commands

  • `node/src/commands/brief.ts` — Node implementation
  • `python/rafter_cli/commands/brief.py` — Python implementation

How to run

```bash
cd node && npx vitest run tests/brief.test.ts
cd python && pytest tests/test_brief.py -v
```

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomershelp wantedExtra attention is neededtestingTest coverage improvement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions