This pull request introduces a comprehensive suite of unit tests for the WorkbenchHoverDelegate class located in vscode/src/vs/platform/hover/browser/hover.ts. The tests aim to cover various functionalities and behaviors of the hover delegate, ensuring its reliability and robustness within the VS Code environment.
Summary
Added a new test file hover.test.ts under src/vs/platform/hover/test/browser to encapsulate all the unit tests for the WorkbenchHoverDelegate class.
Tests include initialization checks, hover display timing, instant hover behavior, hover options handling, and keyboard interaction (specifically, hiding the hover on ESC key press).
Utilized chai for assertions, ts-mockito for mocking dependencies such as IConfigurationService and IHoverService.
Ensured proper setup and teardown for each test to maintain isolation and prevent side effects.
Introduced tests to verify custom behavior like instant hover functionality and its configuration through setInstantHoverTimeLimit, including error handling when instant hover is disabled.
The tests also cover the hover delegate's ability to show and hide hovers with specific options, ensuring the hover widget behaves as expected in various scenarios.
This addition significantly enhances the test coverage for the hover functionality in VS Code, aiding in future development and maintenance efforts by providing a robust foundation to detect regressions and ensure feature stability.
Fixes #4.
🎉 Latest improvements to Sweep:
New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
Description
This pull request introduces a comprehensive suite of unit tests for the
WorkbenchHoverDelegate
class located invscode/src/vs/platform/hover/browser/hover.ts
. The tests aim to cover various functionalities and behaviors of the hover delegate, ensuring its reliability and robustness within the VS Code environment.Summary
hover.test.ts
undersrc/vs/platform/hover/test/browser
to encapsulate all the unit tests for theWorkbenchHoverDelegate
class.chai
for assertions,ts-mockito
for mocking dependencies such asIConfigurationService
andIHoverService
.setInstantHoverTimeLimit
, including error handling when instant hover is disabled.This addition significantly enhances the test coverage for the hover functionality in VS Code, aiding in future development and maintenance efforts by providing a robust foundation to detect regressions and ensure feature stability.
Fixes #4.
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can:
This is an automated message generated by Sweep AI.