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

test(yaml): test handling of omap #4851

Merged
merged 4 commits into from
May 24, 2024
Merged

test(yaml): test handling of omap #4851

merged 4 commits into from
May 24, 2024

Conversation

kt3k
Copy link
Member

@kt3k kt3k commented May 24, 2024

This PR adds test cases of yaml, which exercises the handling omap type in yaml string.

(yaml/_type/omap.ts is covered 100% with this change)

related: #3713

@github-actions github-actions bot added the yaml label May 24, 2024
Copy link

codecov bot commented May 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.35%. Comparing base (5d7cb3c) to head (0628b09).

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.
📢 Have feedback on the report? Share it here.

Comment on lines 38 to 40
function constructYamlOmap(data: Any): Any {
return data !== null ? data : [];
return data;
}
Copy link
Collaborator

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?


// Invalid omap
// map entry is not an object
assertThrows(() => parse("--- !!omap\n"));
Copy link
Collaborator

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.

Copy link
Collaborator

@iuioiua iuioiua left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@kt3k kt3k merged commit 2a6e912 into denoland:main May 24, 2024
12 checks passed
@kt3k kt3k deleted the yaml-test-omap branch May 24, 2024 12:30
kt3k added a commit to kt3k/deno_std that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants