Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

馃敡 test: improve user messages in DdevUtils validation tests - #64

Merged
Morgy93 merged 3 commits into
mainfrom
fix-ai-findings
Jan 12, 2026
Merged

Morgy93 merged 3 commits into
mainfrom
fix-ai-findings

Conversation

@Morgy93

@Morgy93 Morgy93 commented Jan 12, 2026

Copy link
Copy Markdown
Contributor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread src/test/ddev-utils.test.ts Outdated
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants