approvals / approvals/Approvals.NodeJS

verifyAllCombinations() functions not working correctly with asynchronous code

Open
#191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
125
Forks
46
Avg merge
2m
Merged PRs (30d)
16

Description

verifyAllCombinations() functions are not managing async, it can only return [object Promise] when the passed function is async.

Example:
Code:
    const pagesOptions = [[], [y,y], [x,y,z]];

    verifyAllCombinations1(async (option) => {
      await asynchronousTreatment();
      return option;
    }, pagesOptions);
Actual:

[] => [object Promise]
[x,y] => [object Promise]
[x,y,z] => [object Promise]

Expected:

[] =>
[x,y] => x,y
[x,y,z] => x,y,z

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating verifyAllCombinations() and its numbered variants in the TypeScript source, then inspect how they handle the callback result. Verify that an async callback produces resolved values matching the example rather than Promise representations, including the empty and multi-item combinations.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.