Skip to content

test(scanner): add comprehensive test fixtures and CLI integration tests#12

Merged
NhanAZ merged 1 commit into
mainfrom
agent/comprehensive-test-fixtures
Jun 9, 2026
Merged

test(scanner): add comprehensive test fixtures and CLI integration tests#12
NhanAZ merged 1 commit into
mainfrom
agent/comprehensive-test-fixtures

Conversation

@NhanAZ

@NhanAZ NhanAZ commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Added tests/cli/cli.test.ts to test the command-line interface entrypoint end-to-end.
  • Added comprehensive edge-case fixtures: .env, .env.local, .env.example in ai-credentials fixtures.
  • Added a python-pass.py test case for placeholder implementation with pass # TODO.
  • Updated ROADMAP.md to check off the final task for v0.3.0.

Why

As the scanner adds more rules and functionality, testing individual rules directly is no longer sufficient. We need to verify that bin/opk routes arguments accurately, parses the JSON format when requested, enforces minimum severity thresholds, and manages non-zero exit codes when errors are discovered.
This ensures the scanner operates exactly as promised in the ROADMAP.md CLI contract without failing silently.

Verification

  • Running npm test successfully executes 50 tests across 6 suites in < 1 second.
  • cli.test.ts dynamically boots node bin/opk via execSync ensuring exact environment match.

This pull request completes all planned milestones for v0.3.0 - Polish.

@NhanAZ NhanAZ merged commit 20feadd into main Jun 9, 2026
@NhanAZ NhanAZ deleted the agent/comprehensive-test-fixtures branch June 9, 2026 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant