Skip to content

fix(test): run the unit:integrations vitest project from the root scripts - #1157

Merged
ScottMansfield merged 1 commit into
mainfrom
fix/run-integrations-unit-tests
Oct 26, 2026
Merged

ScottMansfield merged 1 commit into
mainfrom
fix/run-integrations-unit-tests

Conversation

@ScottMansfield

Copy link
Copy Markdown
Member

Link to Issue or Description of Change

2. Or, if no issue exists, describe the change:

Problem:
@google/adk-integrations was not participating in tests or coverage. vitest.config.ts defines a unit:integrations project (integrations/test/**/*_test.ts), but the root test, test:unit and test:coverage scripts in package.json select projects by name and never listed it, so its tests were skipped in CI while coverage.include still counted integrations/src/**/*.ts. Every line in the package was therefore reported as 0% covered.

This went unnoticed while the package held only index.ts/index_web.ts/version.ts, but now that it ships real code (#1125, and #1140 on top of it) the uncovered lines push the repo-wide thresholds below 92/85/94/92 and fail run-tests.

Solution:
Add --project unit:integrations to the three root scripts. No vitest config change is needed; the project was already correctly defined.

Testing Plan

Unit Tests:

  • All unit tests pass locally.

npm run test:coverage on this branch:

 Test Files  439 passed | 22 skipped (461)
      Tests  6450 passed | 55 skipped (6505)
All files          |      93 |    86.89 |   95.91 |   93.14 |
 integrations/src  |     100 |      100 |     100 |     100 |
  anthropic_llm.ts |     100 |       90 |     100 |     100 | 89,96

The unit:integrations project alone runs 3 files / 64 tests (version_test.ts, models/anthropic_llm_test.ts, models/anthropic_utils_test.ts), which previously never executed under npm test or in CI.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • New and existing unit tests pass locally with my changes.

Additional context

#1140 should go green once this lands on main and the PR is rebased.

…ipts

The `unit:integrations` project is defined in vitest.config.ts, but the
root `test`, `test:unit` and `test:coverage` scripts select projects by
name and never listed it, so `integrations/test/**` was skipped in CI
while `coverage.include` still counted `integrations/src/**`. Every line
in the package was reported as uncovered, which went unnoticed while it
held only `index.ts` and `version.ts` but pushes the repo-wide
thresholds below the limit now that it ships real models (#1125, #1140).
@ScottMansfield
ScottMansfield merged commit eed3147 into main Oct 26, 2026
15 checks passed
@ScottMansfield
ScottMansfield deleted the fix/run-integrations-unit-tests branch October 26, 2026 16:54
@kalenkevich kalenkevich mentioned this pull request Oct 26, 2026
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.

3 participants