Skip to content

fix: Enable and stabilize CI test execution #77

@Patrick-Ehimen

Description

@Patrick-Ehimen

Summary

Tests are currently disabled in the CI pipeline (ci.yml:84) with a TODO: Re-enable tests once test suite is stabilized. This means PRs merge without any automated test validation, giving false confidence in code quality.

Problem

  1. CI tests disabled — The test job in .github/workflows/ci.yml (line 84) is commented out
  2. SDK wrapper tests broken — Two test blocks in packages/sdk-wrapper/src/__tests__/LighthouseAISDK.test.ts are skipped:
    • Line 51: TODO: Fix authentication mocking - tests require proper fetch/auth mock setup
    • Line 83: TODO: Fix fs mock - missing readFileSync and other fs methods
  3. No test gate on PRs — Branch protection has no passing test requirement

Acceptance Criteria

  • Fix SDK wrapper test mocking (auth and fs mocks)
  • Re-enable the test job in ci.yml
  • All existing tests pass in CI (both Jest and Vitest suites)
  • Branch protection requires passing tests before merge

Files to Modify

  • .github/workflows/ci.yml (line 84–104)
  • packages/sdk-wrapper/src/__tests__/LighthouseAISDK.test.ts
  • Possibly apps/mcp-server/vitest.config.ts for coverage thresholds

Context

  • MCP server uses Vitest (85% line / 90% function / 85% branch targets)
  • All other packages use Jest with ts-jest
  • 47 test files exist across the codebase — most pass individually but CI integration is broken

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions