Skip to content

Add async safe() coverage and polish docs/comments#3

Merged
fprl merged 1 commit intodocsfrom
main
Dec 23, 2025
Merged

Add async safe() coverage and polish docs/comments#3
fprl merged 1 commit intodocsfrom
main

Conversation

@fprl
Copy link
Copy Markdown
Owner

@fprl fprl commented Dec 23, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 23, 2025 12:27
@fprl fprl merged commit 996baf4 into docs Dec 23, 2025
6 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances test coverage for the safe() method by adding explicit tests for async function scenarios and improves the clarity of implementation comments.

Key Changes:

  • Added test coverage for async functions that reject and resolve in both server and client contexts
  • Updated the safe() implementation comment in client.ts to more accurately describe that it accepts both promises and functions

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/errata/test/errata.test.ts Adds two new tests covering async function rejection and resolution scenarios for the server-side safe() method
packages/errata/test/client.test.ts Adds two new tests covering async function rejection and resolution scenarios for the client-side safe() method
packages/errata/src/client.ts Updates the implementation comment to clarify that safe() accepts both promises and functions (replaces "Promise/helper" with "Promise helper or function")

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants