approvals / approvals/Approvals.NodeJS
verifyAllCombinations() functions not working correctly with asynchronous code
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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