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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighter null checks #2107

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

bendemboski
Copy link

@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
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.

None yet

1 participant