Support t.like() assertion #306
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for the
like()assertion to theassertion-arguments,use-t-well, andprefer-power-assertrules.For
prefer-power-assert, I addedlike()to the list of allowed assertions.prefer-power-assertsays it allows assertions with no power-assert equivalent, and I don't think there is such an equivalent.prefer-power-assertalso allowsdeepEqual(), upon whichlike()is based.I didn't find any other rules that need special support for
like().One additional thing that might be useful for
like()support would be a rule ensuring that, if any non-semver experiments are used, thenava's config properly enables them andpackage.jsonpinsavato a specific version instead of using a semver range. I'm not sure how practical this is and in any case I think it would be a subject for another pr.Closes #302, hopefully.