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

fix: fix wrong promise rejection on some fs methods with no return value #279

Merged
merged 1 commit into from
Nov 3, 2019
Merged

fix: fix wrong promise rejection on some fs methods with no return value #279

merged 1 commit into from
Nov 3, 2019

Conversation

3cp
Copy link
Collaborator

@3cp 3cp commented Oct 31, 2019

fs.promises.readFile triggers a list of different calls, the last one is "close". The "close" call has no return value, so we cannot check the existence of "val" to determine successfulness.

closes #278

fs.promises.readFile triggers a list of different calls, the last one is "close". The "close" call has no return value, so we cannot check the existence of "val" to determine successfulness.

closes #278
@3cp
Copy link
Collaborator Author

3cp commented Oct 31, 2019

@tschaub I don't know how to write test case for this unhandled promise rejection.

@tschaub tschaub merged commit 3adb18b into tschaub:master Nov 3, 2019
@tschaub
Copy link
Owner

tschaub commented Nov 3, 2019

Thanks @3cp.

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.

UnhandledPromiseRejectionWarning: null when using fs.promises
2 participants