Skip to content

Add support for underscores to be in callback assert custom class#233

Merged
miguelfbrito merged 1 commit intomasterfrom
feature/support-underscores-on-callback
Mar 31, 2026
Merged

Add support for underscores to be in callback assert custom class#233
miguelfbrito merged 1 commit intomasterfrom
feature/support-underscores-on-callback

Conversation

@Kamefrede
Copy link
Copy Markdown
Member

This PR adds support for underscores to be considered valid in the callback assert custom class name.

Copilot AI review requested due to automatic review settings March 31, 2026 13:43
@Kamefrede Kamefrede force-pushed the feature/support-underscores-on-callback branch from 53230c0 to 32b774e Compare March 31, 2026 13:43
@Kamefrede Kamefrede requested review from a team as code owners March 31, 2026 13:43
@Kamefrede Kamefrede force-pushed the feature/support-underscores-on-callback branch from 32b774e to 2a4cdcf Compare March 31, 2026 13:43
Copy link
Copy Markdown

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

Adds support for underscores in CallbackAssert custom class names by relaxing the validation regex, and introduces a regression test intended to verify the new accepted format.

Changes:

  • Allow _ in callback assert customClass name validation.
  • Add/adjust tests for underscore-containing custom class names.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/asserts/callback-assert.js Updates the custom class name validation regex to accept underscores.
test/asserts/callback-assert.test.js Adds tests intended to validate underscore support (currently introduces failing/inconsistent assertions).
Comments suppressed due to low confidence (1)

test/asserts/callback-assert.test.js:111

  • This new "should not throw" test duplicates the existing one above and doesn't assert anything (so it would pass even if an exception is thrown by a different async context later). Consider removing it, or converting it to the same assert.doesNotThrow(() => ...) pattern and/or using it to specifically validate that an underscore-containing customClass passes when the callback returns true.

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

@Kamefrede Kamefrede force-pushed the feature/support-underscores-on-callback branch from 2a4cdcf to 24a34ae Compare March 31, 2026 13:52
@miguelfbrito miguelfbrito merged commit 9de5a9b into master Mar 31, 2026
7 checks passed
@miguelfbrito miguelfbrito deleted the feature/support-underscores-on-callback branch March 31, 2026 13:53
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