Skip to content

test: add unit tests across schema, lib, and cli modules#318

Open
notgitika wants to merge 5 commits intomainfrom
gitikavj/unit-tests
Open

test: add unit tests across schema, lib, and cli modules#318
notgitika wants to merge 5 commits intomainfrom
gitikavj/unit-tests

Conversation

@notgitika
Copy link
Contributor

Description

Add comprehensive unit tests across schema, lib, and cli modules to improve test coverage from to ~17% line coverage (874 tests total).

Test files added:

  • Schema validators (7): agent-env, agentcore-project, aws-targets, deployed-state, mcp, mcp-defs, constants
  • Lib utilities (6): credentials, env, subprocess, platform, zod, aws-account
  • Lib packaging (5): helpers, errors, uv, node, python
  • CLI cloudformation (4): stack-discovery, outputs-extended, logical-ids, bootstrap
  • CLI operations (3): schema-mapper, preflight, create-mcp
  • CLI TUI (8): useListNavigation, useTextInput, commands, process, diff, gradient, naming, timing

Minor source changes for testability:

  • Export extractResult, parseSSELine, parseSSE from agentcore.ts
  • Export findNextEnabledIndex extracted from useListNavigation.ts
  • Export findPrevWordBoundary, findNextWordBoundary from useTextInput.ts
  • Export extractNodeVersion (renamed from _extractNodeVersion) from node.ts
  • Export extractPythonVersion from python.ts

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe): Improving test coverage

Testing

How have you tested the change?

  • I ran npm run test:all
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@notgitika notgitika requested a review from a team February 15, 2026 19:53
@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 26.9% 1720 / 6393
🔵 Statements 26.25% 1784 / 6794
🔵 Functions 26.36% 343 / 1301
🔵 Branches 23.48% 879 / 3743
Generated in workflow #355 for commit 97dc64a by the Vitest Coverage Report Action

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