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: added coverage for fs/promises API #20219

Closed
wants to merge 1 commit into from

Conversation

mithunsasidharan
Copy link
Contributor

@mithunsasidharan mithunsasidharan commented Apr 23, 2018

Added coverage for block inside promises#write where the buffer fails isUint8Array check

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Apr 23, 2018
validateWrite()
.then(validateEmptyWrite)
.then(validateNonUint8ArrayWrite)
.then(common.mustCall());
Copy link
Member

Choose a reason for hiding this comment

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

It would be great to run those validations in parallel instead of waiting on the result of the former ones. Therefore it would be good to write this as:

Promise.all([
  validateWrite(),
  validateEmptyWrite(),
  validateNonUint8ArrayWrite()
]).then(common.mustCall());

To make sure that works as expected, the temp files have to be unique though (have a unique name).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@BridgeAR : Thanks for the feedback. As you said, makes sense to run those validations in parallel. I've updated the PR with the changes. Kindly review. Thanks.

@BridgeAR

This comment has been minimized.

@BridgeAR BridgeAR added fast-track PRs that do not need to wait for 48 hours to land. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Apr 23, 2018
@trivikr
Copy link
Member

trivikr commented Apr 26, 2018

@BridgeAR
Copy link
Member

Landed in 062a6e2 🎉

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Apr 26, 2018
PR-URL: nodejs#20219
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@BridgeAR BridgeAR closed this Apr 26, 2018
MylesBorins pushed a commit that referenced this pull request May 4, 2018
PR-URL: #20219
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants