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

Add a matcher to negate a passed in matcher #1151

Merged
merged 2 commits into from
Aug 8, 2024
Merged

Add a matcher to negate a passed in matcher #1151

merged 2 commits into from
Aug 8, 2024

Conversation

younata
Copy link
Member

@younata younata commented Aug 8, 2024

This adds a new matcher that inverts the passed-in matcher.

This matcher is really useful when you're working with matchers taking in other matchers, such as allPass, map, satisfyAllOf, satisfyAnyOf and so on.

Future work would be to refactor how Expectation, AsyncExpectation, Requirement, AsyncRequiment such that toNot/notTo are syntax sugar for to(not(...)). But that's a larger refactor than I want to do for this PR.

fixes #1150

Checklist - While not every PR needs it, new features should consider this list:

  • Does this have tests?
  • Does this have documentation?
  • Is this a new feature (Requires minor version bump)?

@younata younata merged commit 26e5348 into main Aug 8, 2024
16 checks passed
@younata younata deleted the negation_matcher branch August 8, 2024 05:36
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Aug 29, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Quick/Nimble](https://togithub.com/Quick/Nimble) | minor | `from:
"13.3.0"` -> `from: "13.4.0"` |

---

### Release Notes

<details>
<summary>Quick/Nimble (Quick/Nimble)</summary>

### [`v13.4.0`](https://togithub.com/Quick/Nimble/releases/tag/v13.4.0)

[Compare
Source](https://togithub.com/Quick/Nimble/compare/v13.3.0...v13.4.0)

#### What's Changed

- Bump rexml from 3.2.6 to 3.2.8 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/Quick/Nimble/pull/1143](https://togithub.com/Quick/Nimble/pull/1143)
- BeLogical: fix retroactive conformance error. by
[@&#8203;TomerHacohen](https://togithub.com/TomerHacohen) in
[https://github.com/Quick/Nimble/pull/1149](https://togithub.com/Quick/Nimble/pull/1149)
- Add a matcher to negate a passed in matcher by
[@&#8203;younata](https://togithub.com/younata) in
[https://github.com/Quick/Nimble/pull/1151](https://togithub.com/Quick/Nimble/pull/1151)

#### New Contributors

- [@&#8203;TomerHacohen](https://togithub.com/TomerHacohen) made their
first contribution in
[https://github.com/Quick/Nimble/pull/1149](https://togithub.com/Quick/Nimble/pull/1149)

**Full Changelog**:
Quick/Nimble@v13.3.0...v13.4.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41NS4wIiwidXBkYXRlZEluVmVyIjoiMzguNTUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com>
noamfreeman pushed a commit to noamfreeman/Nimble that referenced this pull request Oct 14, 2024
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.

Map matcher that inverts the submatcher.
1 participant