Skip to content
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

Tighter null checks #2107

Merged
merged 2 commits into from
Jun 17, 2024
Merged

Conversation

bendemboski
Copy link
Contributor

@bendemboski bendemboski commented May 17, 2024

While looking over #2101 I noticed a bug that it introduced when matchesSelector() or doesNotMatchSelector() are run on a null target, so this PR extends the test coverage to include a null target for those assertions as well as all the others that didn't already test that case.

Having strictNullChecks enabled also would have caught the bug, and the project was pretty close to being able to enable them, so I made some changes to allow it.

I'm happy to split these out into separate PRs if desired, or change this syntax if we don't like nested terniary operators 😄

A number of the assertion tests weren't testing the case where `null` is passed as the target
@BobrImperator BobrImperator merged commit a420f27 into mainmatter:master Jun 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants