Skip to content

test: fix error message checking#171

Merged
snitin315 merged 1 commit intomainfrom
test-error-messages
Mar 24, 2025
Merged

test: fix error message checking#171
snitin315 merged 1 commit intomainfrom
test-error-messages

Conversation

@mdjermanovic
Copy link
Copy Markdown
Member

Prerequisites checklist

What is the purpose of this pull request?

Fixes error message checking in several config-array tests.

What changes did you make? (Give an overview)

  • Fixed testValidationError helper function to treat expectedError argument as a regex that should be passed to assert.throws() as that's how it is used in the tests.
  • Updated two calls to pass a regex because strings don't really check error messages.
  • Simplified checks for configArray.normalize() to use assert.rejects().

Related Issues

Is there anything you'd like reviewers to focus on?

Copy link
Copy Markdown
Contributor

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@snitin315 snitin315 moved this from Needs Triage to Implementing in Triage Mar 24, 2025
@snitin315 snitin315 merged commit e8aefd2 into main Mar 24, 2025
18 checks passed
@snitin315 snitin315 deleted the test-error-messages branch March 24, 2025 03:08
@github-project-automation github-project-automation Bot moved this from Implementing to Complete in Triage Mar 24, 2025
snitin315 pushed a commit that referenced this pull request Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

2 participants