Repository navigation
Fix the health check service test typing - #1807
Merged
Merged
Conversation
Assert the first http.get call with toHaveBeenCalledWith instead of indexing mock.calls[0][1], which does not type check because the mocked HttpHandler keeps only its last overload and breaks yarn osd bootstrap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Antonio David Gutiérrez <antonio.gutierrez@wazuh.com>
Member
|
============ Workflow runs ============
|
Member
|
Packages finished building successfully. |
asteriscos
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the
5.0.0bootstrap failure (tsc -b tsconfig.refs.json, TS2493/TS2339) caused by the unit test added in #1804, which breaks every dashboard package build.Closes #1806
Proposed Changes
http.getcall insrc/core/public/healthcheck/service.test.tswithtoHaveBeenCalledWith('/api/healthcheck/internal', { query: undefined, asSystemRequest: undefined })instead of indexingmock.calls[0][1], which does not type check because the mockedHttpHandlerkeeps only its last overload.Results and Evidence
tsc -b tsconfig.refs.jsonexits 0 and the healthcheck suite passes (17 passed, 1 skipped) in the dev container (Node 22.23.4).Artifacts Affected
None.
Configuration Changes
None.
Documentation Updates
None.
Tests Introduced
None new; the existing test "sends a regular request by default" is rewritten to type check.
Review Checklist
no-changelog)