Skip to content

Add html and text-summary coverage reporters to karma config - #15

Open
samanthataylor3 wants to merge 1 commit into
masterfrom
devin/1787580443-coverage-report
Open

samanthataylor3 wants to merge 1 commit into
masterfrom
devin/1787580443-coverage-report

Conversation

@samanthataylor3

@samanthataylor3 samanthataylor3 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes:

Extends coverageIstanbulReporter.reports in karma.conf.cjs from ['lcovonly'] to ['lcovonly', 'html', 'text-summary'] so npm run test also produces a browsable HTML report in coverage/unit/ and prints a coverage summary to the console, in addition to the lcov file consumed by codecov.io.

Verified locally: full unit suite passes (975 SUCCESS, 67 skipped) and reports overall line coverage of 47.75%.

Note: known reporting limitations (Vue instrumentation gaps, skipFilesWithNoCoverage: true excluding fully-uncovered files) are documented in TESTING.md and apply to these reports as well.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this a notable change that will require a special callout in the release notes? For example, will this break compatibility with existing APIs or projects that consume these plugins?

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

Link to Devin session: https://app.devin.ai/sessions/4f85fd0beb834627b810941e79e6423d
Requested by: @samanthataylor3


Devin Review

Status Commit
⚪ Not started

Run Devin Review

💡 Connect your GitHub account to enable automatic code reviews.

Devin Review (Staging)

Co-Authored-By: Samantha Taylor <samantha.taylor@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown
Original prompt from Samantha

Repository: COG-GTM/openmct (ref: master)

Goal: Produce a human-readable unit test line-coverage report for the codebase (or a user-specified subdirectory of src).

Context:

  • Unit tests run via Karma + Jasmine using the config file karma.conf.cjs. Run them with npm run test (headless Chrome). Install deps first with nvm use (if available) and npm install.
  • Coverage is instrumented via babel-plugin-istanbul and the coverage-istanbul Karma reporter, configured in karma.conf.cjs under coverageIstanbulReporter. Currently it only outputs lcovonly into coverage/unit.

Steps:

  1. In karma.conf.cjs, extend coverageIstanbulReporter.reports to include 'html' and 'text-summary' in addition to 'lcovonly' so a human-readable report is produced (HTML in coverage/unit and a summary printed to the console).
  2. Run npm run test to execute the full unit suite and generate coverage.
  3. Collect the text-summary output and the generated HTML report from coverage/unit.
  4. Summarize overall and per-directory line coverage. Explicitly flag any Vue (.vue) files or others that appear uncovered due to known Istanbul/Vue instrumentation gaps (documented in TESTING.md), so the numbers aren't misread as missing tests.
  5. Report the results back, including the path to the HTML report.

Expected outcome: A clear coverage summary plus an HTML report, with caveats noted about known instrumentation/accuracy limitations.

@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot added type:maintenance Maintenance/CI change no milestone PR intentionally has no milestone labels Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no milestone PR intentionally has no milestone type:maintenance Maintenance/CI change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant