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

HaveExistingField matcher #553

Merged
merged 1 commit into from May 20, 2022
Merged

Conversation

thediveo
Copy link
Collaborator

@thediveo thediveo commented May 7, 2022

  • implements issue RFC: a "forgiving" HaveField matcher #548 with new HaveExistingField matcher
  • modifies existing extractField helper from HaveField for reuse with HaveExistingField
  • adds new unit tests for HaveExistingField matcher
  • updates documentation

@thediveo thediveo requested a review from onsi May 18, 2022
@onsi
Copy link
Owner

onsi commented May 18, 2022

whoops! sorry for the delay. I took a look and this makes sense. The notion of a severe error in the implementation also makes sense. An alternative could be to return an explicit FieldNotFoundError and key off of that in the HaveExistingField matcher but it's nbd. we can merge as is imo

@thediveo
Copy link
Collaborator Author

thediveo commented May 18, 2022

Your suggestion about changing from severe error to field-not-found absolutely makes sense and semantically much more so than the notion of severe error. I will refactor the PR, highly appreciated suggestion!

- implements new HaveExistingField matcher
- modifies existing extractField helper from HaveField for reuse with HaveExistingField
- adds new unit tests for HaveExistingField matcher
- updates documentation
@thediveo thediveo force-pushed the existing-field-matcher branch from ed51c4b to a9e85e6 Compare May 20, 2022
@thediveo thediveo merged commit fd130e1 into onsi:master May 20, 2022
5 checks passed
@thediveo thediveo deleted the existing-field-matcher branch May 20, 2022
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

2 participants