Skip to content

docs(assert): improve docs - #4876

Merged
kt3k merged 2 commits into
denoland:mainfrom
kt3k:document-assert
May 30, 2024
Merged

kt3k merged 2 commits into
denoland:mainfrom
kt3k:document-assert

Conversation

@kt3k

@kt3k kt3k commented May 29, 2024

Copy link
Copy Markdown
Contributor

This PR improves the API docs of assert package. Now the @param @returns @typeParam are fully documented. It passes doc-linter check.

part of #4600 #3764

@kt3k
kt3k requested a review from iuioiua May 29, 2024 08:21
@codecov

codecov Bot commented May 29, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.95%. Comparing base (1e194f7) to head (1d2faf4).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4876      +/-   ##
==========================================
- Coverage   92.36%   91.95%   -0.41%     
==========================================
  Files         488      487       -1     
  Lines       41604    38895    -2709     
  Branches     5405     5388      -17     
==========================================
- Hits        38426    35765    -2661     
+ Misses       3122     3074      -48     
  Partials       56       56              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kt3k kt3k mentioned this pull request May 29, 2024
37 of 38 tasks

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

Instead of not evaluating the example code snippets, in most cases, we could instead remove LOC that throw and keep LOC that don't throw.

Comment thread assert/assert_equals.ts
*
* Note: This option is experimental and may be removed in the future.
*/
formatter?: (value: unknown) => string;

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.

Sidenote: see #4891

@kt3k

kt3k commented May 30, 2024

Copy link
Copy Markdown
Contributor Author

Instead of not evaluating the example code snippets, in most cases, we could instead remove LOC that throw and keep LOC that don't throw.

I think it's good to give explicit example of the case where it throws.

@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 47c3849 into denoland:main May 30, 2024
@kt3k
kt3k deleted the document-assert branch June 14, 2024 12:42
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