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: Add test covg for Maybe<T> #1270

Merged
merged 6 commits into from
Jan 22, 2023
Merged

Conversation

JckXia
Copy link
Member

@JckXia JckXia commented Jan 13, 2023

Add test coverage for #1046

@JckXia JckXia added the test label Jan 13, 2023
@@ -6,18 +7,63 @@ using namespace Napi;
namespace {

void VoidCallback(const CallbackInfo& info) {
Function fn = info[0].As<Function>();
Napi::Function fn = info[0].As<Function>();
Maybe<Value> fn_m = fn.Call({});
Copy link
Member

Choose a reason for hiding this comment

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

This variable represents the return value of the fn invocation. Might be worth to name it with prefix like ret, rather than fn.

Suggested change
Maybe<Value> fn_m = fn.Call({});
Maybe<Value> ret_m = fn.Call({});

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated the PR to fix this.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

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

LGTM

@JckXia JckXia merged commit fdc6263 into nodejs:main Jan 22, 2023
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.

3 participants