Skip to content

Conversation

@Morgy93
Copy link
Contributor

@Morgy93 Morgy93 commented Jan 12, 2026

This pull request makes improvements to the unit tests for the DdevUtils class, focusing on making test assertions more precise and explicit. The main changes involve updating how user-facing error messages are validated and clarifying error types in assertions.

Test assertion improvements:

  • Changed assertions in validateDdevTool tests to compare the returned userMessage directly to the expected full message, rather than just checking for substrings. This ensures that the error messages are exactly as intended. [1] [2]
  • Updated the error type in the execDdev test's thrown error assertion to use a more specific type annotation ({ status: number; stderr: string }), improving type safety and clarity.

Copilot AI review requested due to automatic review settings January 12, 2026 21:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves test assertions for the DdevUtils validation methods by making them more precise and explicit. The changes replace substring checks with exact string comparisons for user-facing error messages and improve type annotations for error handling tests.

Changes:

  • Replaced substring assertions with exact string equality checks in validateDdevTool tests for better validation precision
  • Added a more specific type annotation for error objects in execDdev test

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Morgy93 Morgy93 merged commit d3e6853 into main Jan 12, 2026
15 checks passed
@Morgy93 Morgy93 deleted the fix-ai-findings branch January 12, 2026 22:11
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.

2 participants