Skip to content

test(yaml): test handling of omap - #4851

Merged
kt3k merged 4 commits into
denoland:mainfrom
kt3k:yaml-test-omap
May 24, 2024
Merged

kt3k merged 4 commits into
denoland:mainfrom
kt3k:yaml-test-omap

Conversation

@kt3k

@kt3k kt3k commented May 24, 2024 •

Copy link
Copy Markdown
Contributor

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
@codecov

codecov Bot commented May 24, 2024 •

Copy link
Copy Markdown

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 thread yaml/_type/omap.ts Outdated
Comment on lines 38 to 40
function constructYamlOmap(data: Any): Any {
return data !== null ? data : [];
return data;
}

Copy link
Copy Markdown
Contributor

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?

Comment thread yaml/parse_test.ts Outdated

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

Copy link
Copy Markdown
Contributor

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.

@iuioiua iuioiua left a comment

Copy link
Copy Markdown
Contributor

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
@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.

2 participants