-
Notifications
You must be signed in to change notification settings - Fork 628
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
test(yaml): test handling of omap #4851
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4851 +/- ##
==========================================
+ Coverage 92.26% 92.35% +0.09%
==========================================
Files 487 487
Lines 41535 41531 -4
Branches 5394 5405 +11
==========================================
+ Hits 38324 38358 +34
+ Misses 3154 3117 -37
+ Partials 57 56 -1 ☔ View full report in Codecov by Sentry. |
yaml/_type/omap.ts
Outdated
function constructYamlOmap(data: Any): Any { | ||
return data !== null ? data : []; | ||
return data; | ||
} |
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.
This function seems to do nothing. Can we remove it?
yaml/parse_test.ts
Outdated
|
||
// Invalid omap | ||
// map entry is not an object | ||
assertThrows(() => parse("--- !!omap\n")); |
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.
Can you please add the error class and message arguments for assertThrows()
? Ditto for the other instances.
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.
Nice
This PR adds test cases of
yaml
, which exercises the handlingomap
type in yaml string.(
yaml/_type/omap.ts
is covered 100% with this change)related: #3713