Open
Conversation
|
Replace try-catch blocks that silently swallowed errors with Vitest's .fails() modifier. This properly reports test results while still allowing expected failures to pass CI, similar to pytest's xfail. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Add xfail-style test helper similar to pytest's @pytest.mark.xfail: - If test passes → test passes (ideal outcome) - If test fails → logs XFAIL with reason, test still passes This allows apt install tests to fail without breaking CI while still clearly reporting failures in test output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Vitest fixtures require object destructuring pattern in the callback. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a reusable allowFail() wrapper that works with any test fixture. Tests wrapped with allowFail will log failures but not break CI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Vitest requires object destructuring pattern in fixture callbacks. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Vitest fixtures don't support generic wrappers with rest parameters. Use a specific wrapper function instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.
due to flakiness with ubuntu mirror to prevent breaking our CI when services are unavailable
Note
Low Risk
Test-only change that relaxes failure behavior for known-flaky
aptinstall scenarios; main risk is reduced signal if real regressions slip through.Overview
Marks
aptInstalltemplate tests as allowed to fail to avoid CI breakages from flaky Ubuntu mirrors.In the JS SDK, introduces
buildTemplateTestAllowFailintests/setup.tsthat catches build errors and logs[ALLOW_FAIL], and switchesaptInstall.test.tsto use it. In the Python SDK, annotates the async and syncapt_installtests withpytest.mark.xfailso failures don’t fail the suite.Written by Cursor Bugbot for commit d3f0b67. This will update automatically on new commits. Configure here.