Skip to content

Conversation

@fayekelmith
Copy link
Collaborator

@fayekelmith fayekelmith commented Dec 20, 2025

Request:

 curl "http://localhost:7799/tests/coverage" | jq .

Response:

[
  {
    "language": "typescript",
    "unit_tests": {
      "total": 536,
      "total_tests": 9,
      "covered": 3,
      "percent": 0.56,
      "total_lines": 9675,
      "covered_lines": 157,
      "line_percent": 1.62
    },
    "integration_tests": {
      "total": 2,
      "total_tests": 6,
      "covered": 0,
      "percent": 0.0,
      "total_lines": 2,
      "covered_lines": 0,
      "line_percent": 0.0
    },
    "e2e_tests": null,
    "mocks": null
  },
  {
    "language": "rust",
    "unit_tests": {
      "total": 536,
      "total_tests": 9,
      "covered": 3,
      "percent": 0.56,
      "total_lines": 9675,
      "covered_lines": 157,
      "line_percent": 1.62
    },
    "integration_tests": {
      "total": 536,
      "total_tests": 6,
      "covered": 8,
      "percent": 1.49,
      "total_lines": 9675,
      "covered_lines": 210,
      "line_percent": 2.17
    },
    "e2e_tests": {
      "total": 2,
      "total_tests": 32,
      "covered": 0,
      "percent": 0.0,
      "total_lines": 2,
      "covered_lines": 0,
      "line_percent": 0.0
    },
    "mocks": null
  }
]

Request:

curl "http://localhost:7799/tests/coverage?language=rust" | jq . 

Response:

[
  {
    "language": "rust",
    "unit_tests": {
      "total": 536,
      "total_tests": 9,
      "covered": 3,
      "percent": 0.56,
      "total_lines": 9675,
      "covered_lines": 157,
      "line_percent": 1.62
    },
    "integration_tests": {
      "total": 536,
      "total_tests": 6,
      "covered": 8,
      "percent": 1.49,
      "total_lines": 9675,
      "covered_lines": 210,
      "line_percent": 2.17
    },
    "e2e_tests": {
      "total": 2,
      "total_tests": 32,
      "covered": 0,
      "percent": 0.0,
      "total_lines": 2,
      "covered_lines": 0,
      "line_percent": 0.0
    },
    "mocks": null
  }
]

@fayekelmith fayekelmith force-pushed the feat/multi-lang-coverage branch from 164ba30 to 60519f7 Compare January 5, 2026 13:37
@Evanfeenstra
Copy link
Collaborator

to keep it backward compatible, can we keep the old format, but add each individual language in "languages" array

so the global would combine from each language

{ 
  "unit_tests": {
      "total": 1034,
      "total_tests": 9,
      "covered": 3,
      "percent": 0.56,
      "total_lines": 9675,
      "covered_lines": 157,
      "line_percent": 1.62
    },
    "integration_tests": {
      "total": 2,
      "total_tests": 6,
      "covered": 0,
      "percent": 0.0,
      "total_lines": 2,
      "covered_lines": 0,
      "line_percent": 0.0
    },
    "e2e_tests": null,
    "mocks": null,
    "languages": [
      {
        "name": "typescript",
        "unit_tests": {
          "total": 400,
          "total_tests": 9,
          "covered": 3,
          "percent": 0.56,
          "total_lines": 9675,
          "covered_lines": 157,
          "line_percent": 1.62
        }
      }
    ]
  }

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.

2 participants