Skip to content

test: fix Maven component metadata suite compilation - #7411

Open
nico-incubiq wants to merge 1 commit into
mainfrom
fix/cli-1949-maven-metadata-test-teardown
Open

nico-incubiq wants to merge 1 commit into
mainfrom
fix/cli-1949-maven-metadata-test-teardown

Conversation

@nico-incubiq

@nico-incubiq nico-incubiq commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Unblocks compilation of the Maven component-metadata acceptance suite. #7352 added FakeServer typing on October 13 (5680a5ce), exposing a pre-existing Promise<unknown> resolver incompatible with close(() => void). Declare Promise<void>.

The suite protects metadata flag forwarding, hash/distribution labels, the flag-off control, and repository credential stripping.

Where should the reviewer start?

test/jest/acceptance/snyk-test/maven-include-component-metadata.spec.ts, teardown.

CLI-1949 tracks the external skip and an earlier missing Axis distribution-URL assertion. The October 22 retry failed compilation before executing tests; this fix does not establish that the earlier assertion passes.

How should this be manually tested?

With Maven and a native built CLI, run this Jest suite using TEST_SNYK_COMMAND.

Pending external action: remove only maven-include-component-metadata\.spec\.ts from CircleCI context team-cli-workflow-context → TEST_SNYK_IGNORE_LIST, preserving other exclusions. No CircleCI configuration access in this session; live value unverified.

Passed: make format, make lint; reported TS2345 reproduced, then eliminated. Runtime validation blocked by missing Maven/macOS binary on Linux. Snyk Code scan blocked by authentication.

What's the product update that needs to be communicated to CLI users?

None; test-only change.

Risk assessment (Low | Medium | High)?

Low. No production changes; existing assertions remain intact.


Note

Low Risk
Test-only typing fix; no runtime or production impact.

Overview
Fixes a TypeScript compile error in the Maven --include-component-metadata acceptance suite teardown by typing the afterAll shutdown promise as Promise<void>.

That aligns the promise resolver passed to server.close(res) with FakeServer.close’s () => void callback after stricter FakeServer typing surfaced the mismatch. No test behavior or production code changes.

Reviewed by Cursor Bugbot for commit 206adf0. Bugbot is set up for automated code reviews on this repo. Configure here.

@nico-incubiq
nico-incubiq requested review from a team as code owners October 23, 2026 14:41
@snyk-pr-review-bot

This comment has been minimized.

@danskmt
danskmt force-pushed the fix/cli-1949-maven-metadata-test-teardown branch from 206adf0 to 6a1cd02 Compare October 26, 2026 08:40
@snyk-io

snyk-io Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@snyk-pr-review-bot

Copy link
Copy Markdown

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ No major issues detected
📚 Repository Context Analyzed

This review considered 3 relevant code sections from 3 files (average relevance: 0.84)

🤖 Repository instructions applied (from AGENTS.md)

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.

1 participant