-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: do not report duplicate keys errors for keys added by merge keys #25
Conversation
ignoreDuplicateKeys: false, | ||
}); | ||
|
||
expect(result.diagnostics).toEqual([]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@P0lip In order to protect this from potential future regressions, isn't there a way to also assess the expected result of the merges?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll add such an assertion for sure, before I mark it as ready for review, no worries.
Just in case you were concerned, we already have a few tests covering merge keys :)
yaml/src/__tests__/parseWithPointers.spec.ts
Line 343 in f8b2298
describe('merge keys', () => { |
I just didn't cover diagnostics. :P
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nulltoken just in case you were interested, a test case has been added.
Thanks for providing an excellent fixture I could use right away. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nulltoken just in case you were interested, a test case has been added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 looks good to me!
🎉 This PR is included in version 3.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…#25) * fix: do not report duplicate keys errors for keys added by merge keys * test: extra override scenario
* feat(dumping): support lineWidth * fix: do not report duplicate keys errors for keys added by merge keys (#25) * fix: do not report duplicate keys errors for keys added by merge keys * test: extra override scenario * chore: use @stoplight/yaml-ast-parser
Fixes stoplightio/spectral#552