-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
fs/promises test coverage is poor. #20435
Comments
@benjamingr is this suitable for |
Ideally we should have a shared test suite between the callback-based functions and the promise-based ones. |
@ChALkeR I think so - thanks :) I'm doing an onboarding event on May 15th and I could make writing tests for fs promises functions into a good "first Node.js PR" exercise. |
I agree this seems like the right direction. Not re-implementing tests, but figuring out how to get callbacks and promises to share tests. |
It's been an outstanding to-do of mine that's not on my schedule to get back to until later in May. If others can jump in and help fill in gaps I'd certainly appreciate it. |
@TimothyGu @davisjam @jasnell @ChALkeR Proof-of-concept to kick around: #20439 |
Was: https://coverage.nodejs.org/coverage-b55a11d1b17b3e4b/root/fs/promises.js.html It became much better, but not complete yet — there are still methods without any tests. |
Going to have new contributors work on this today @ChALkeR :) |
Going to ask them to PR into @Trott 's branch since it looks like a nicer approach |
Yeah, I've told people to do that instead - was slightly confusing but people were able to contribute to other things in the meantime so no harm done :) |
Of the mentioned above modules, only Closing this, no reason for a meta issue anymore. |
Might want to consider opening one for |
Some methods remain uncovered in the latest report. |
Experimental
fs/promises
API is present in the currentmaster
without proper test coverage.According to the coverage report, the following functions are not tested at all:
fd.chown
,fd.datasync
,fd.sync
,fd.truncate
,fd.utimes
,truncate
,readlink
,symlink
,lstat
,lchmod
,lchown
,fchown
,chown
,realpath
.#19811 adds a few tests, but that's still not near being complete even after that lands.
Note that tests for
lchown
should probably be landed after #20407 as that method is currently broken (until #20407 lands)./cc @mscdex @davisjam @nodejs/testing
The text was updated successfully, but these errors were encountered: