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

Documentation for match contains does not reflect changes in 0.9.6 #1289

Closed
gavl-cdl opened this issue Sep 25, 2020 · 2 comments
Closed

Documentation for match contains does not reflect changes in 0.9.6 #1289

gavl-cdl opened this issue Sep 25, 2020 · 2 comments

Comments

@gavl-cdl
Copy link

gavl-cdl commented Sep 25, 2020

The second example in the documentation for match contains states:

Note that match contains will "recurse", so any nested JSON chunks will also be matched using match contains:
* def original = { a: 1, b: 2, c: 3, d: { a: 1, b: 2 } }
* def expected = { a: 1, c: 3, d: { b: 2 } }
* match original contains expected

But this example fails in 0.9.6 (line break added for readability):

assertion failed: path: $.d, actual: {a=1, b=2}, expected: {b=2},
reason: actual value has 1 more key(s) than expected: {a=1}

Indeed, the documentation for the new match contains deep and the 0.9.6 release notes both use this same example to describe the difference between match contains and match contains deep

IMO, this should probably be mentioned in the "breaking changes" section of the release notes, because it will cause existing feature files to fail if they rely on the old recursive-contains behaviour

@ptrthomas ptrthomas self-assigned this Sep 25, 2020
ptrthomas added a commit that referenced this issue Sep 25, 2020
ptrthomas added a commit that referenced this issue Sep 25, 2020
@ptrthomas
Copy link
Member

thanks for raising this. fixed and release-notes updated

@gavl-cdl
Copy link
Author

Wow, <1 hour to fixed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants