Skip to content

Add support for substring matching within output assertion #311

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

DT3264
Copy link
Contributor

@DT3264 DT3264 commented Jun 18, 2025

Description

Expand true assert to allow for sub-string matching.

Add a new assert function contains-string to allow for substrings to be matched within the output of an assert block.

Related Issue(s)

See #302 - Expand true.contains to support substring matching

Steps to test/reproduce

Tested through npm test

Please let me know any comments and feedback, specially on testing since I am not 100% confident that the tests from the initial commit are enough.

@jgerigmeyer jgerigmeyer requested a review from mirisuzanne June 19, 2025 15:06
Copy link
Member

@mirisuzanne mirisuzanne left a comment

Choose a reason for hiding this comment

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

Looks good on my end. I left extremely minor lint suggestions. @jgerigmeyer if the JS looks good to you, I think it's good to go. Thanks, @DT3264!

Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

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

Code looks fine to me! I left a few minor nits, and also please run yarn lint to resolve some other formatting inconsistencies.

@DT3264
Copy link
Contributor Author

DT3264 commented Jun 21, 2025

Addressed suggestions including npm lint

Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

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

Thanks!

@jgerigmeyer jgerigmeyer merged commit 60da5f0 into oddbird:main Jun 23, 2025
@DT3264 DT3264 deleted the ContainsString branch July 1, 2025 23:01
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.

3 participants