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 😄
While looking over #2101 I noticed a bug that it introduced when
matchesSelector()
ordoesNotMatchSelector()
are run on anull
target, so this PR extends the test coverage to include anull
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 😄