Skip to content

Add unit tests for code coverage improvement #11

@a6b8

Description

@a6b8

Summary

Add comprehensive unit test suite to improve code coverage from ~27% to ~67%.

Details

  • 32 new test files covering FlowMcpCli public methods and edge cases
  • 436 total tests across 41 test suites
  • Coverage: 67.35% statements, 67.04% lines
  • Theoretical maximum without mocking: ~68.3% (due to CLI entry points, network helpers, init/install flows)
  • Excludes index.mjs (CLI entry point with process.argv) from coverage via jest.config.mjs

Test Categories

  • Validation (schema validation, config validation, edge cases)
  • Tool operations (search, add, remove, list, call)
  • Status and health checks
  • Cache operations
  • Group management
  • ZodBuilder edge cases
  • Shared lists (resolution, broken files, missing dirs)
  • Handlers with shared lists and required libraries
  • Auth error handling
  • Path edge cases (FIFO, missing files, empty dirs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions